From c0a243d9b095947691df42474fd165b7cdb0bd92 Mon Sep 17 00:00:00 2001 From: Gerardo Lecaros Date: Fri, 29 Sep 2023 07:52:06 -0700 Subject: [PATCH] =?UTF-8?q?[ARM]=20Updating=20Azure.ResourceManager.Machin?= =?UTF-8?q?eLearning=20to=20generate=20for=20=E2=80=A6=20(#38814)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/cspell.json | 8 + .../CHANGELOG.md | 11 +- ...eManager.MachineLearning.netstandard2.0.cs | 3265 ++++++++++++++++- ...ninRegistryComponentContainerCollection.cs | 215 ++ ...arninRegistryComponentContainerResource.cs | 126 + ...arninRegistryComponentVersionCollection.cs | 228 ++ ...LearninRegistryComponentVersionResource.cs | 135 + ...achineLearningBatchDeploymentCollection.cs | 30 +- ..._MachineLearningBatchDeploymentResource.cs | 18 +- ..._MachineLearningBatchEndpointCollection.cs | 30 +- ...le_MachineLearningBatchEndpointResource.cs | 24 +- ..._MachineLearningCodeContainerCollection.cs | 30 +- ...le_MachineLearningCodeContainerResource.cs | 18 +- ...le_MachineLearningCodeVersionCollection.cs | 30 +- ...mple_MachineLearningCodeVersionResource.cs | 52 +- ...ineLearningComponentContainerCollection.cs | 30 +- ...chineLearningComponentContainerResource.cs | 18 +- ...chineLearningComponentVersionCollection.cs | 30 +- ...MachineLearningComponentVersionResource.cs | 18 +- ...Sample_MachineLearningComputeCollection.cs | 90 +- .../Sample_MachineLearningComputeResource.cs | 128 +- ..._MachineLearningDataContainerCollection.cs | 30 +- ...le_MachineLearningDataContainerResource.cs | 18 +- ...le_MachineLearningDataVersionCollection.cs | 36 +- ...mple_MachineLearningDataVersionResource.cs | 18 +- ...mple_MachineLearningDatastoreCollection.cs | 14 +- ...Sample_MachineLearningDatastoreResource.cs | 14 +- ...eLearningEnvironmentContainerCollection.cs | 30 +- ...ineLearningEnvironmentContainerResource.cs | 18 +- ...ineLearningEnvironmentVersionCollection.cs | 30 +- ...chineLearningEnvironmentVersionResource.cs | 18 +- ...Sample_MachineLearningFeatureCollection.cs | 177 + .../Sample_MachineLearningFeatureResource.cs | 53 + ...neLearningFeatureSetContainerCollection.cs | 217 ++ ...hineLearningFeatureSetContainerResource.cs | 127 + ...hineLearningFeatureSetVersionCollection.cs | 272 ++ ...achineLearningFeatureSetVersionResource.cs | 264 ++ ...ngFeatureStoreEntityContainerCollection.cs | 217 ++ ...ningFeatureStoreEntityContainerResource.cs | 127 + ...ningFeaturestoreEntityVersionCollection.cs | 231 ++ ...arningFeaturestoreEntityVersionResource.cs | 139 + .../Sample_MachineLearningJobCollection.cs | 230 +- .../Sample_MachineLearningJobResource.cs | 379 +- ...le_MachineLearningLabelingJobCollection.cs | 275 ++ ...mple_MachineLearningLabelingJobResource.cs | 268 ++ ...MachineLearningModelContainerCollection.cs | 30 +- ...e_MachineLearningModelContainerResource.cs | 18 +- ...e_MachineLearningModelVersionCollection.cs | 30 +- ...ple_MachineLearningModelVersionResource.cs | 82 +- ...chineLearningOnlineDeploymentCollection.cs | 18 +- ...MachineLearningOnlineDeploymentResource.cs | 20 +- ...MachineLearningOnlineEndpointCollection.cs | 30 +- ...e_MachineLearningOnlineEndpointResource.cs | 36 +- ...hineLearningOutboundRuleBasicCollection.cs | 209 ++ ...achineLearningOutboundRuleBasicResource.cs | 120 + ...ningPrivateEndpointConnectionCollection.cs | 12 +- ...arningPrivateEndpointConnectionResource.cs | 60 +- ...LearningRegistryCodeContainerCollection.cs | 212 ++ ...neLearningRegistryCodeContainerResource.cs | 123 + ...neLearningRegistryCodeVersionCollection.cs | 224 ++ ...hineLearningRegistryCodeVersionResource.cs | 165 + ...ample_MachineLearningRegistryCollection.cs | 282 ++ ...LearningRegistryDataContainerCollection.cs | 217 ++ ...neLearningRegistryDataContainerResource.cs | 127 + ...neLearningRegistryDataVersionCollection.cs | 230 ++ ...hineLearningRegistryDataVersionResource.cs | 169 + ...gRegistryEnvironmentContainerCollection.cs | 219 ++ ...ingRegistryEnvironmentContainerResource.cs | 130 + ...ingRegistryEnvironmentVersionCollection.cs | 235 ++ ...rningRegistryEnvironmentVersionResource.cs | 142 + ...earningRegistryModelContainerCollection.cs | 212 ++ ...eLearningRegistryModelContainerResource.cs | 123 + ...eLearningRegistryModelVersionCollection.cs | 234 ++ ...ineLearningRegistryModelVersionResource.cs | 240 ++ .../Sample_MachineLearningRegistryResource.cs | 279 ++ ...ample_MachineLearningScheduleCollection.cs | 10 +- .../Sample_MachineLearningScheduleResource.cs | 6 +- ...mple_MachineLearningWorkspaceCollection.cs | 94 +- ...neLearningWorkspaceConnectionCollection.cs | 71 +- ...hineLearningWorkspaceConnectionResource.cs | 96 +- ...Sample_MachineLearningWorkspaceResource.cs | 274 +- .../Sample_SubscriptionResourceExtensions.cs | 8 +- .../Extensions/MachineLearningExtensions.cs | 57 + .../MachineLearningCodeVersionCollection.cs | 62 + ...chineLearningComponentVersionCollection.cs | 66 + .../MachineLearningDataVersionCollection.cs | 74 + ...ineLearningEnvironmentVersionCollection.cs | 66 + .../MachineLearningJobCollection.cs | 66 + .../Customized/MachineLearningJobResource.cs | 100 + .../MachineLearningModelVersionCollection.cs | 51 +- .../MachineLearningWorkspaceCollection.cs | 60 + ...hineLearningWorkspaceConnectionResource.cs | 98 + .../MachineLearningWorkspaceData.cs | 31 + .../MachineLearningWorkspaceResource.cs | 60 + .../Models/ComputeSchedules.Serialization.cs | 3 +- .../Models/ComputeSchedules.cs | 3 +- .../Models/EncryptionUpdateProperties.cs | 21 + ...MachineLearningComputeStartStopSchedule.cs | 32 + ...ineLearningEncryptionKeyVaultProperties.cs | 41 + .../MachineLearningEncryptionSetting.cs | 40 + ...ialManagedServiceIdentity.Serialization.cs | 0 ...neLearningPartialManagedServiceIdentity.cs | 0 .../MachineLearningPublicNetworkAccess.cs | 2 - .../Models/MachineLearningValueFormat.cs | 3 +- ...neLearningWorkspaceConnectionProperties.cs | 24 + .../Models/MachineLearningWorkspacePatch.cs | 29 + .../ArmMachineLearningModelFactory.cs | 2155 +++++++---- .../Extensions/MachineLearningExtensions.cs | 678 +++- .../ResourceGroupResourceExtensionClient.cs | 7 + .../SubscriptionResourceExtensionClient.cs | 150 +- .../ExportSummaryOperationSource.cs | 31 + ...gistryComponentContainerOperationSource.cs | 40 + ...RegistryComponentVersionOperationSource.cs | 40 + ...rningFeatureSetContainerOperationSource.cs | 40 + ...ineLearningFeatureSetJobOperationSource.cs | 31 + ...earningFeatureSetVersionOperationSource.cs | 40 + ...tureStoreEntityContainerOperationSource.cs | 40 + ...eaturestoreEntityVersionOperationSource.cs | 40 + ...chineLearningLabelingJobOperationSource.cs | 40 + ...earningOutboundRuleBasicOperationSource.cs | 40 + ...ingRegistryCodeContainerOperationSource.cs | 40 + ...rningRegistryCodeVersionOperationSource.cs | 40 + ...ingRegistryDataContainerOperationSource.cs | 40 + ...rningRegistryDataVersionOperationSource.cs | 40 + ...stryEnvironmentContainerOperationSource.cs | 40 + ...gistryEnvironmentVersionOperationSource.cs | 40 + ...ngRegistryModelContainerOperationSource.cs | 40 + ...ningRegistryModelVersionOperationSource.cs | 40 + .../MachineLearningRegistryOperationSource.cs | 40 + ...edNetworkProvisionStatusOperationSource.cs | 31 + .../ModelPackageResultOperationSource.cs | 31 + ...ninRegistryComponentContainerCollection.cs | 417 +++ ...arninRegistryComponentContainerResource.cs | 350 ++ ...arninRegistryComponentVersionCollection.cs | 423 +++ ...LearninRegistryComponentVersionResource.cs | 297 ++ ...achineLearningBatchDeploymentCollection.cs | 4 +- .../MachineLearningBatchEndpointCollection.cs | 4 +- .../MachineLearningCodeVersionCollection.cs | 16 +- .../MachineLearningCodeVersionResource.cs | 69 + ...chineLearningComponentVersionCollection.cs | 14 +- .../MachineLearningComputeResource.cs | 137 + .../MachineLearningDataVersionCollection.cs | 40 +- .../Generated/MachineLearningDatastoreData.cs | 6 +- ...ineLearningEnvironmentVersionCollection.cs | 14 +- .../MachineLearningFeatureCollection.cs | 341 ++ .../Generated/MachineLearningFeatureData.cs | 45 + .../MachineLearningFeatureResource.cs | 153 + ...neLearningFeatureSetContainerCollection.cs | 422 +++ .../MachineLearningFeatureSetContainerData.cs | 45 + ...hineLearningFeatureSetContainerResource.cs | 350 ++ ...hineLearningFeatureSetVersionCollection.cs | 422 +++ .../MachineLearningFeatureSetVersionData.cs | 45 + ...achineLearningFeatureSetVersionResource.cs | 480 +++ ...ngFeatureStoreEntityContainerCollection.cs | 422 +++ ...LearningFeatureStoreEntityContainerData.cs | 45 + ...ningFeatureStoreEntityContainerResource.cs | 350 ++ ...ningFeaturestoreEntityVersionCollection.cs | 422 +++ ...neLearningFeaturestoreEntityVersionData.cs | 45 + ...arningFeaturestoreEntityVersionResource.cs | 297 ++ .../Generated/MachineLearningJobCollection.cs | 32 +- .../src/Generated/MachineLearningJobData.cs | 6 +- .../Generated/MachineLearningJobResource.cs | 41 +- .../MachineLearningLabelingJobCollection.cs | 431 +++ .../MachineLearningLabelingJobData.cs | 45 + .../MachineLearningLabelingJobResource.cs | 506 +++ .../MachineLearningModelVersionCollection.cs | 8 +- .../MachineLearningModelVersionResource.cs | 77 + ...chineLearningOnlineDeploymentCollection.cs | 4 +- ...MachineLearningOnlineEndpointCollection.cs | 4 +- .../MachineLearningOnlineEndpointResource.cs | 4 +- ...hineLearningOutboundRuleBasicCollection.cs | 415 +++ .../MachineLearningOutboundRuleBasicData.cs | 57 + ...achineLearningOutboundRuleBasicResource.cs | 297 ++ ...ningPrivateEndpointConnectionCollection.cs | 34 +- ...neLearningPrivateEndpointConnectionData.cs | 20 +- ...arningPrivateEndpointConnectionResource.cs | 18 +- ...LearningRegistryCodeContainerCollection.cs | 417 +++ ...neLearningRegistryCodeContainerResource.cs | 350 ++ ...neLearningRegistryCodeVersionCollection.cs | 421 +++ ...hineLearningRegistryCodeVersionResource.cs | 366 ++ .../MachineLearningRegistryCollection.cs | 416 +++ .../Generated/MachineLearningRegistryData.cs | 100 + ...LearningRegistryDataContainerCollection.cs | 420 +++ ...neLearningRegistryDataContainerResource.cs | 350 ++ ...neLearningRegistryDataVersionCollection.cs | 432 +++ ...hineLearningRegistryDataVersionResource.cs | 366 ++ ...gRegistryEnvironmentContainerCollection.cs | 420 +++ ...ingRegistryEnvironmentContainerResource.cs | 350 ++ ...ingRegistryEnvironmentVersionCollection.cs | 426 +++ ...rningRegistryEnvironmentVersionResource.cs | 297 ++ ...earningRegistryModelContainerCollection.cs | 420 +++ ...eLearningRegistryModelContainerResource.cs | 350 ++ ...eLearningRegistryModelVersionCollection.cs | 422 +++ ...ineLearningRegistryModelVersionResource.cs | 442 +++ .../MachineLearningRegistryResource.cs | 943 +++++ .../MachineLearningScheduleCollection.cs | 4 +- .../MachineLearningScheduleResource.cs | 4 +- .../MachineLearningWorkspaceCollection.cs | 14 +- ...neLearningWorkspaceConnectionCollection.cs | 6 + .../MachineLearningWorkspaceConnectionData.cs | 6 +- ...hineLearningWorkspaceConnectionResource.cs | 103 +- .../Generated/MachineLearningWorkspaceData.cs | 193 +- .../MachineLearningWorkspaceResource.cs | 906 +++-- ...spaceConnectionProperties.Serialization.cs | 117 + ...eyAuthTypeWorkspaceConnectionProperties.cs | 37 + .../AmlTokenComputeIdentity.Serialization.cs | 41 + .../Models/AmlTokenComputeIdentity.cs | 26 + ...spaceConnectionProperties.Serialization.cs | 117 + ...ApiKeyAuthWorkspaceConnectionProperties.cs | 69 + .../Models/ArmResourceId.Serialization.cs | 56 + .../src/Generated/Models/ArmResourceId.cs | 36 + .../Generated/Models/AutoDeleteCondition.cs | 51 + .../Models/AutoDeleteSetting.Serialization.cs | 71 + .../src/Generated/Models/AutoDeleteSetting.cs | 32 + .../Models/AutoMLJob.Serialization.cs | 82 +- .../src/Generated/Models/AutoMLJob.cs | 8 +- .../AutoMLVerticalRegression.Serialization.cs | 81 +- .../Models/AutoMLVerticalRegression.cs | 15 +- .../Models/AutoMLVerticalRegressionModel.cs | 2 +- .../AutologgerSettings.Serialization.cs | 41 + .../Generated/Models/AutologgerSettings.cs | 23 + ...AlertNotificationSettings.Serialization.cs | 41 + ...zMonMonitoringAlertNotificationSettings.cs | 26 + .../AzureDevOpsWebhook.Serialization.cs | 64 + .../Generated/Models/AzureDevOpsWebhook.cs | 27 + ...eMLBatchInferencingServer.Serialization.cs | 64 + .../Models/AzureMLBatchInferencingServer.cs | 31 + ...MLOnlineInferencingServer.Serialization.cs | 64 + .../Models/AzureMLOnlineInferencingServer.cs | 31 + .../BaseEnvironmentSource.Serialization.cs | 39 + .../Generated/Models/BaseEnvironmentSource.cs | 32 + .../Models/BaseEnvironmentSourceType.cs | 48 + .../BaseEnvironmentType.Serialization.cs | 49 + .../Generated/Models/BaseEnvironmentType.cs | 39 + ...chDeploymentConfiguration.Serialization.cs | 39 + .../Models/BatchDeploymentConfiguration.cs | 32 + .../BatchDeploymentConfigurationType.cs | 51 + ...ntDeploymentConfiguration.Serialization.cs | 156 + ...ipelineComponentDeploymentConfiguration.cs | 48 + ...eferenceForConsumptionDto.Serialization.cs | 61 + .../Models/BlobReferenceForConsumptionDto.cs | 53 + .../Models/CategoricalDataDriftMetric.cs | 54 + ...lDataDriftMetricThreshold.Serialization.cs | 72 + .../CategoricalDataDriftMetricThreshold.cs | 34 + .../Models/CategoricalDataQualityMetric.cs | 54 + ...ataQualityMetricThreshold.Serialization.cs | 72 + .../CategoricalDataQualityMetricThreshold.cs | 34 + .../CategoricalPredictionDriftMetric.cs | 54 + ...ctionDriftMetricThreshold.Serialization.cs | 72 + ...tegoricalPredictionDriftMetricThreshold.cs | 34 + .../Generated/Models/ClassificationModel.cs | 2 +- .../ClassificationModelPerformanceMetric.cs | 54 + ...erformanceMetricThreshold.Serialization.cs | 72 + ...ficationModelPerformanceMetricThreshold.cs | 34 + .../ClassificationTask.Serialization.cs | 81 +- .../Generated/Models/ClassificationTask.cs | 15 +- ...ificationTrainingSettings.Serialization.cs | 17 +- .../Models/ClassificationTrainingSettings.cs | 7 +- .../Models/CocoExportSummary.Serialization.cs | 108 + .../src/Generated/Models/CocoExportSummary.cs | 41 + ...nstanceAutologgerSettings.Serialization.cs | 48 + .../ComputeInstanceAutologgerSettings.cs | 28 + .../Models/ComputeRuntimeDto.Serialization.cs | 44 + .../src/Generated/Models/ComputeRuntimeDto.cs | 28 + ...puteStartStopCronSchedule.Serialization.cs | 78 + .../Models/ComputeStartStopCronSchedule.cs | 48 + ...artStopRecurrenceSchedule.Serialization.cs | 112 + .../ComputeStartStopRecurrenceSchedule.cs | 50 + .../Models/ContainerCommunicationProtocol.cs | 54 + .../Models/ContainerEndpoint.Serialization.cs | 120 + .../src/Generated/Models/ContainerEndpoint.cs | 44 + .../src/Generated/Models/CosmosDbSettings.cs | 4 +- .../CreateMonitorAction.Serialization.cs | 49 + .../Generated/Models/CreateMonitorAction.cs | 39 + .../src/Generated/Models/CredentialsType.cs | 6 + .../Models/CsvExportSummary.Serialization.cs | 108 + .../src/Generated/Models/CsvExportSummary.cs | 41 + .../CustomInferencingServer.Serialization.cs | 64 + .../Models/CustomInferencingServer.cs | 31 + .../Models/CustomKeys.Serialization.cs | 60 + .../src/Generated/Models/CustomKeys.cs | 32 + ...spaceConnectionProperties.Serialization.cs | 117 + ...CustomKeysWorkspaceConnectionProperties.cs | 54 + .../CustomMetricThreshold.Serialization.cs | 64 + .../Generated/Models/CustomMetricThreshold.cs | 51 + .../CustomMonitoringSignal.Serialization.cs | 193 + .../Models/CustomMonitoringSignal.cs | 83 + .../Models/CustomService.Serialization.cs | 173 + .../src/Generated/Models/CustomService.cs | 89 + ...taCollectionConfiguration.Serialization.cs | 109 + .../Models/DataCollectionConfiguration.cs | 40 + .../Generated/Models/DataCollectionMode.cs | 51 + .../Models/DataCollector.Serialization.cs | 91 + .../src/Generated/Models/DataCollector.cs | 76 + ...aDriftMetricThresholdBase.Serialization.cs | 52 + .../Models/DataDriftMetricThresholdBase.cs | 47 + ...DataDriftMonitoringSignal.Serialization.cs | 205 ++ .../Models/DataDriftMonitoringSignal.cs | 114 + .../Models/DataImport.Serialization.cs | 287 ++ .../src/Generated/Models/DataImport.cs | 60 + .../Models/DataImportSource.Serialization.cs | 52 + .../src/Generated/Models/DataImportSource.cs | 36 + .../Generated/Models/DataImportSourceType.cs | 51 + ...ualityMetricThresholdBase.Serialization.cs | 52 + .../Models/DataQualityMetricThresholdBase.cs | 47 + ...taQualityMonitoringSignal.Serialization.cs | 182 + .../Models/DataQualityMonitoringSignal.cs | 110 + .../Models/DatabaseSource.Serialization.cs | 190 + .../src/Generated/Models/DatabaseSource.cs | 48 + .../DatasetExportSummary.Serialization.cs | 97 + .../Generated/Models/DatasetExportSummary.cs | 37 + .../src/Generated/Models/DatastoreType.cs | 6 + .../src/Generated/Models/DistributionType.cs | 3 + .../Models/DockerSetting.Serialization.cs | 71 + .../src/Generated/Models/DockerSetting.cs | 66 + ...AlertNotificationSettings.Serialization.cs | 64 + ...mailMonitoringAlertNotificationSettings.cs | 31 + .../Models/EmailNotificationEnableType.cs | 54 + ...nKeyVaultUpdateProperties.Serialization.cs | 23 + .../EncryptionKeyVaultUpdateProperties.cs | 29 + ...ncryptionUpdateProperties.Serialization.cs | 23 + .../Models/EncryptionUpdateProperties.cs | 34 + .../EnvironmentVariable.Serialization.cs | 74 + .../Generated/Models/EnvironmentVariable.cs | 70 + .../Models/EnvironmentVariableType.cs | 48 + .../src/Generated/Models/ExportFormatType.cs | 54 + .../Models/ExportSummary.Serialization.cs | 41 + .../src/Generated/Models/ExportSummary.cs | 50 + ...tionDriftMonitoringSignal.Serialization.cs | 125 + ...FeatureAttributionDriftMonitoringSignal.cs | 81 + .../Models/FeatureAttributionMetric.cs | 48 + ...ttributionMetricThreshold.Serialization.cs | 64 + .../FeatureAttributionMetricThreshold.cs | 45 + .../src/Generated/Models/FeatureDataType.cs | 69 + ...esourceArmPaginatedResult.Serialization.cs | 50 + .../FeatureResourceArmPaginatedResult.cs | 37 + ...SetVersionBackfillContent.Serialization.cs | 70 + .../FeatureSetVersionBackfillContent.cs | 48 + .../Generated/Models/FeatureStoreJobType.cs | 51 + .../FeatureStoreSettings.Serialization.cs | 70 + .../Generated/Models/FeatureStoreSettings.cs | 48 + .../Models/FeatureSubset.Serialization.cs | 60 + .../src/Generated/Models/FeatureSubset.cs | 41 + .../Models/FeatureWindow.Serialization.cs | 80 + .../src/Generated/Models/FeatureWindow.cs | 34 + ...esourceArmPaginatedResult.Serialization.cs | 50 + ...esetContainerResourceArmPaginatedResult.cs | 37 + ...esetJobArmPaginatedResult.Serialization.cs | 49 + .../Models/FeaturesetJobArmPaginatedResult.cs | 36 + .../FeaturesetSpecification.Serialization.cs | 56 + .../Models/FeaturesetSpecification.cs | 28 + ...esourceArmPaginatedResult.Serialization.cs | 50 + ...uresetVersionResourceArmPaginatedResult.cs | 37 + ...esourceArmPaginatedResult.Serialization.cs | 50 + ...tityContainerResourceArmPaginatedResult.cs | 37 + ...esourceArmPaginatedResult.Serialization.cs | 50 + ...EntityVersionResourceArmPaginatedResult.cs | 37 + .../Models/FileSystemSource.Serialization.cs | 87 + .../src/Generated/Models/FileSystemSource.cs | 32 + .../Models/FixedInputData.Serialization.cs | 116 + .../src/Generated/Models/FixedInputData.cs | 39 + .../src/Generated/Models/ForecastingModel.cs | 2 +- .../ForecastingSettings.Serialization.cs | 35 +- .../Generated/Models/ForecastingSettings.cs | 13 +- ...recastingTrainingSettings.Serialization.cs | 17 +- .../Models/ForecastingTrainingSettings.cs | 7 +- .../Models/FqdnOutboundRule.Serialization.cs | 82 + .../src/Generated/Models/FqdnOutboundRule.cs | 33 + .../Models/GenerationSafetyQualityMetric.cs | 75 + ...etyQualityMetricThreshold.Serialization.cs | 64 + .../GenerationSafetyQualityMetricThreshold.cs | 51 + ...tyQualityMonitoringSignal.Serialization.cs | 173 + ...GenerationSafetyQualityMonitoringSignal.cs | 66 + .../Models/GenerationTokenStatisticsMetric.cs | 51 + ...StatisticsMetricThreshold.Serialization.cs | 64 + ...enerationTokenStatisticsMetricThreshold.cs | 51 + ...tionTokenStatisticsSignal.Serialization.cs | 140 + .../Models/GenerationTokenStatisticsSignal.cs | 61 + .../Models/HdfsDatastore.Serialization.cs | 216 ++ .../src/Generated/Models/HdfsDatastore.cs | 64 + .../IdleShutdownSetting.Serialization.cs | 26 + .../Generated/Models/IdleShutdownSetting.cs | 21 + .../Generated/Models/ImageAnnotationType.cs | 54 + .../Models/ImageMetadata.Serialization.cs | 49 + .../src/Generated/Models/ImageMetadata.cs | 36 + .../Models/ImageModelDistributionSettings.cs | 4 +- ...ModelDistributionSettingsClassification.cs | 4 +- ...odelDistributionSettingsObjectDetection.cs | 4 +- ...elSettingsObjectDetection.Serialization.cs | 32 +- .../ImageModelSettingsObjectDetection.cs | 10 +- .../Models/ImageSetting.Serialization.cs | 74 + .../src/Generated/Models/ImageSetting.cs | 70 + .../src/Generated/Models/ImageType.cs | 51 + .../Models/ImportDataAction.Serialization.cs | 49 + .../src/Generated/Models/ImportDataAction.cs | 39 + .../Models/IncrementalDataRefresh.cs | 51 + .../Models/IndexColumn.Serialization.cs | 71 + .../src/Generated/Models/IndexColumn.cs | 32 + .../Models/InferencingServer.Serialization.cs | 42 + .../src/Generated/Models/InferencingServer.cs | 32 + .../Generated/Models/InferencingServerType.cs | 57 + .../src/Generated/Models/InputPathType.cs | 54 + .../IntellectualProperty.Serialization.cs | 56 + .../Generated/Models/IntellectualProperty.cs | 40 + .../Models/IntellectualProtectionLevel.cs | 51 + .../src/Generated/Models/IsolationMode.cs | 54 + .../Models/JobAllNodes.Serialization.cs | 41 + .../src/Generated/Models/JobAllNodes.cs | 26 + .../src/Generated/Models/JobInputType.cs | 2 +- .../Models/JobNodes.Serialization.cs | 39 + .../src/Generated/Models/JobNodes.cs | 32 + .../Generated/Models/JobProvisioningState.cs | 57 + .../Models/JobQueueSettings.Serialization.cs | 71 + .../src/Generated/Models/JobQueueSettings.cs | 32 + .../Models/JobStatusMessage.Serialization.cs | 71 + .../src/Generated/Models/JobStatusMessage.cs | 42 + .../Generated/Models/JobStatusMessageLevel.cs | 54 + .../src/Generated/Models/JobTier.cs | 60 + .../src/Generated/Models/JobType.cs | 6 + ...KerberosKeytabCredentials.Serialization.cs | 73 + .../Models/KerberosKeytabCredentials.cs | 60 + .../KerberosKeytabSecrets.Serialization.cs | 64 + .../Generated/Models/KerberosKeytabSecrets.cs | 31 + ...rberosPasswordCredentials.Serialization.cs | 73 + .../Models/KerberosPasswordCredentials.cs | 60 + .../KerberosPasswordSecrets.Serialization.cs | 64 + .../Models/KerberosPasswordSecrets.cs | 31 + .../Models/LabelCategory.Serialization.cs | 106 + .../src/Generated/Models/LabelCategory.cs | 40 + .../Models/LabelCategoryMultiSelect.cs | 51 + .../Models/LabelClass.Serialization.cs | 91 + .../src/Generated/Models/LabelClass.cs | 36 + ...LabelingDataConfiguration.Serialization.cs | 71 + .../Models/LabelingDataConfiguration.cs | 32 + ...abelingJobImageProperties.Serialization.cs | 56 + .../Models/LabelingJobImageProperties.cs | 31 + .../LabelingJobInstructions.Serialization.cs | 57 + .../Models/LabelingJobInstructions.cs | 30 + ...abelingJobMediaProperties.Serialization.cs | 40 + .../Models/LabelingJobMediaProperties.cs | 32 + .../LabelingJobProperties.Serialization.cs | 529 +++ .../Generated/Models/LabelingJobProperties.cs | 122 + ...esourceArmPaginatedResult.Serialization.cs | 50 + .../LabelingJobResourceArmPaginatedResult.cs | 37 + ...LabelingJobTextProperties.Serialization.cs | 56 + .../Models/LabelingJobTextProperties.cs | 31 + .../Models/LakeHouseArtifact.Serialization.cs | 49 + .../src/Generated/Models/LakeHouseArtifact.cs | 34 + .../src/Generated/Models/LogTrainingMetric.cs | 51 + .../src/Generated/Models/LogValidationLoss.cs | 51 + ...sistConfigurationDisabled.Serialization.cs | 41 + .../Models/MLAssistConfigurationDisabled.cs | 26 + .../Models/MLAssistConfigurationType.cs | 51 + ...achineLearningAllFeatures.Serialization.cs | 41 + .../Models/MachineLearningAllFeatures.cs | 26 + .../MachineLearningAssetBase.Serialization.cs | 25 +- .../Models/MachineLearningAssetBase.cs | 14 +- ...earningAssetReferenceBase.Serialization.cs | 2 +- .../MachineLearningAssetReferenceBase.cs | 2 +- ...arningAssistConfiguration.Serialization.cs | 40 + .../MachineLearningAssistConfiguration.cs | 32 + ...ssistEnabledConfiguration.Serialization.cs | 57 + ...chineLearningAssistEnabledConfiguration.cs | 46 + ...earningAzureBlobDatastore.Serialization.cs | 71 +- .../MachineLearningAzureBlobDatastore.cs | 15 +- ...zureDataLakeGen1Datastore.Serialization.cs | 71 +- ...chineLearningAzureDataLakeGen1Datastore.cs | 15 +- ...zureDataLakeGen2Datastore.Serialization.cs | 71 +- ...chineLearningAzureDataLakeGen2Datastore.cs | 15 +- ...earningAzureFileDatastore.Serialization.cs | 71 +- .../MachineLearningAzureFileDatastore.cs | 15 +- ...BatchDeploymentProperties.Serialization.cs | 25 +- ...achineLearningBatchDeploymentProperties.cs | 20 +- .../Models/MachineLearningCmkIdentity.cs | 6 +- ...ngCodeContainerProperties.Serialization.cs | 12 +- .../MachineLearningCodeContainerProperties.cs | 7 +- ...ningCodeVersionProperties.Serialization.cs | 35 +- .../MachineLearningCodeVersionProperties.cs | 11 +- ...MachineLearningCommandJob.Serialization.cs | 105 +- .../Models/MachineLearningCommandJob.cs | 30 +- ...ponentContainerProperties.Serialization.cs | 12 +- ...ineLearningComponentContainerProperties.cs | 7 +- ...omponentVersionProperties.Serialization.cs | 58 +- ...chineLearningComponentVersionProperties.cs | 15 +- ...ComputeInstanceProperties.Serialization.cs | 105 +- ...achineLearningComputeInstanceProperties.cs | 40 +- .../MachineLearningComputePowerAction.cs | 2 +- ...gComputeStartStopSchedule.Serialization.cs | 46 +- ...MachineLearningComputeStartStopSchedule.cs | 24 +- .../MachineLearningConnectionAuthType.cs | 12 + .../MachineLearningConnectionCategory.cs | 39 + ...tainerRegistryCredentials.Serialization.cs | 14 +- ...ineLearningContainerRegistryCredentials.cs | 14 +- .../Models/MachineLearningContainerType.cs | 9 +- ...rningCustomModelJobOutput.Serialization.cs | 71 +- .../MachineLearningCustomModelJobOutput.cs | 14 +- ...rningDataVersionCollectionGetAllOptions.cs | 34 + ...ningDataVersionProperties.Serialization.cs | 71 +- .../MachineLearningDataVersionProperties.cs | 21 +- ...rningDatastoreCredentials.Serialization.cs | 2 + .../MachineLearningDatastoreCredentials.cs | 2 +- ...arningDatastoreProperties.Serialization.cs | 27 +- .../MachineLearningDatastoreProperties.cs | 14 +- ...eLearningDatastoreSecrets.Serialization.cs | 2 + .../Models/MachineLearningDatastoreSecrets.cs | 2 +- ...mentResourceConfiguration.Serialization.cs | 58 +- ...LearningDeploymentResourceConfiguration.cs | 7 +- ...DistributionConfiguration.Serialization.cs | 1 + ...achineLearningDistributionConfiguration.cs | 2 +- ...ryptionKeyVaultProperties.Serialization.cs | 22 +- ...ineLearningEncryptionKeyVaultProperties.cs | 42 +- ...LearningEncryptionSetting.Serialization.cs | 57 +- .../MachineLearningEncryptionSetting.cs | 54 +- ...ineLearningEndpointDeploymentProperties.cs | 4 +- ...onmentContainerProperties.Serialization.cs | 12 +- ...eLearningEnvironmentContainerProperties.cs | 7 +- ...ironmentVersionProperties.Serialization.cs | 81 +- ...ineLearningEnvironmentVersionProperties.cs | 19 +- ...achineLearningFeatureData.Serialization.cs | 71 + ...LearningFeatureProperties.Serialization.cs | 163 + .../MachineLearningFeatureProperties.cs | 37 + ...tureSetContainerCollectionGetAllOptions.cs | 33 + ...ngFeatureSetContainerData.Serialization.cs | 71 + ...ureSetContainerProperties.Serialization.cs | 172 + ...neLearningFeatureSetContainerProperties.cs | 36 + ...hineLearningFeatureSetJob.Serialization.cs | 131 + .../Models/MachineLearningFeatureSetJob.cs | 65 + ...eatureSetVersionCollectionGetAllOptions.cs | 37 + ...ningFeatureSetVersionData.Serialization.cs | 71 + ...atureSetVersionProperties.Serialization.cs | 290 ++ ...hineLearningFeatureSetVersionProperties.cs | 66 + ...eEntityContainerCollectionGetAllOptions.cs | 33 + ...eStoreEntityContainerData.Serialization.cs | 71 + ...EntityContainerProperties.Serialization.cs | 172 + ...ngFeatureStoreEntityContainerProperties.cs | 36 + ...reEntityVersionProperties.Serialization.cs | 244 ++ ...ningFeatureStoreEntityVersionProperties.cs | 46 + ...oreEntityVersionCollectionGetAllOptions.cs | 37 + ...urestoreEntityVersionData.Serialization.cs | 71 + .../Models/MachineLearningFlowAutoLogger.cs | 51 + .../MachineLearningFlowAutoLoggerState.cs | 51 + ...earningFlowModelJobOutput.Serialization.cs | 71 +- .../MachineLearningFlowModelJobOutput.cs | 14 +- ...achineLearningForecasting.Serialization.cs | 81 +- .../Models/MachineLearningForecasting.cs | 15 +- .../Models/MachineLearningFqdnEndpoints.cs | 2 +- ...chineLearningJobCollectionGetAllOptions.cs | 33 + .../MachineLearningJobPatch.Serialization.cs | 26 + .../Models/MachineLearningJobPatch.cs | 38 + ...hineLearningJobProperties.Serialization.cs | 61 +- .../Models/MachineLearningJobProperties.cs | 13 +- ...gJobResourceConfiguration.Serialization.cs | 58 +- ...MachineLearningJobResourceConfiguration.cs | 7 +- .../MachineLearningJobScheduleAction.cs | 6 +- ...MachineLearningJobService.Serialization.cs | 25 +- .../Models/MachineLearningJobService.cs | 20 +- .../Models/MachineLearningJobStatus.cs | 3 + ...ubernetesOnlineDeployment.Serialization.cs | 25 +- ...chineLearningKubernetesOnlineDeployment.cs | 5 +- ...neLearningLabelingJobData.Serialization.cs | 71 + ...thTypeWorkspaceConnection.Serialization.cs | 51 +- ...agedIdentityAuthTypeWorkspaceConnection.cs | 8 +- ...ngManagedOnlineDeployment.Serialization.cs | 25 +- .../MachineLearningManagedOnlineDeployment.cs | 5 +- ...gModelContainerProperties.Serialization.cs | 12 +- ...MachineLearningModelContainerProperties.cs | 7 +- ...ningModelVersionCollectionGetAllOptions.cs | 2 + ...ingModelVersionProperties.Serialization.cs | 81 +- .../MachineLearningModelVersionProperties.cs | 19 +- ...thTypeWorkspaceConnection.Serialization.cs | 51 +- ...LearningNoneAuthTypeWorkspaceConnection.cs | 8 +- ...rningNotebookResourceInfo.Serialization.cs | 19 +- .../MachineLearningNotebookResourceInfo.cs | 14 +- ...nlineDeploymentProperties.Serialization.cs | 25 +- ...chineLearningOnlineDeploymentProperties.cs | 8 +- ...gOnlineEndpointProperties.Serialization.cs | 36 +- ...MachineLearningOnlineEndpointProperties.cs | 7 +- ...chineLearningOutboundRule.Serialization.cs | 51 + .../Models/MachineLearningOutboundRule.cs | 40 + ...ningOutboundRuleBasicData.Serialization.cs | 71 + .../MachineLearningOutputDeliveryMode.cs | 3 + ...thTypeWorkspaceConnection.Serialization.cs | 51 +- ...eLearningPatAuthTypeWorkspaceConnection.cs | 8 +- ...achineLearningPipelineJob.Serialization.cs | 59 +- .../Models/MachineLearningPipelineJob.cs | 4 +- .../Models/MachineLearningPrivateEndpoint.cs | 8 +- ...gPrivateEndpointServiceConnectionStatus.cs | 8 +- .../MachineLearningPrivateLinkResource.cs | 8 +- ...neLearningPrivateLinkResourceListResult.cs | 4 +- ...inkServiceConnectionState.Serialization.cs | 34 +- ...arningPrivateLinkServiceConnectionState.cs | 22 +- .../MachineLearningProvisioningState.cs | 2 +- ...chineLearningRegistryData.Serialization.cs | 338 ++ ...stryModelVersionCollectionGetAllOptions.cs | 35 + ...hineLearningRegistryPatch.Serialization.cs | 42 + .../Models/MachineLearningRegistryPatch.cs | 30 + ...ningResourceConfiguration.Serialization.cs | 58 +- .../MachineLearningResourceConfiguration.cs | 17 +- ...thTypeWorkspaceConnection.Serialization.cs | 51 +- ...eLearningSasAuthTypeWorkspaceConnection.cs | 8 +- ...ineLearningScheduleAction.Serialization.cs | 2 + .../Models/MachineLearningScheduleAction.cs | 2 +- ...chineLearningScheduleBase.Serialization.cs | 30 +- .../Models/MachineLearningScheduleBase.cs | 8 +- .../MachineLearningScheduleProperties.cs | 6 +- .../Models/MachineLearningScriptReference.cs | 4 +- ...SharedPrivateLinkResource.Serialization.cs | 24 +- ...achineLearningSharedPrivateLinkResource.cs | 18 +- .../MachineLearningSweepJob.Serialization.cs | 82 +- .../Models/MachineLearningSweepJob.cs | 8 +- .../MachineLearningTable.Serialization.cs | 71 +- .../Generated/Models/MachineLearningTable.cs | 13 +- ...ineLearningTableJobOutput.Serialization.cs | 71 +- .../Models/MachineLearningTableJobOutput.cs | 14 +- ...eLearningTrainingSettings.Serialization.cs | 17 +- .../Models/MachineLearningTrainingSettings.cs | 14 +- .../Models/MachineLearningTrialComponent.cs | 4 +- ...rningTritonModelJobOutput.Serialization.cs | 71 +- .../MachineLearningTritonModelJobOutput.cs | 14 +- ...earningUriFileDataVersion.Serialization.cs | 71 +- .../MachineLearningUriFileDataVersion.cs | 13 +- ...eLearningUriFileJobOutput.Serialization.cs | 71 +- .../Models/MachineLearningUriFileJobOutput.cs | 14 +- ...rningUriFolderDataVersion.Serialization.cs | 71 +- .../MachineLearningUriFolderDataVersion.cs | 13 +- ...earningUriFolderJobOutput.Serialization.cs | 71 +- .../MachineLearningUriFolderJobOutput.cs | 14 +- ...thTypeWorkspaceConnection.Serialization.cs | 51 +- ...namePasswordAuthTypeWorkspaceConnection.cs | 8 +- .../MachineLearningWebhook.Serialization.cs | 51 + .../Models/MachineLearningWebhook.cs | 36 + .../Models/MachineLearningWebhookType.cs | 48 + ...ConnectionManagedIdentity.Serialization.cs | 24 +- ...rningWorkspaceConnectionManagedIdentity.cs | 10 +- ...gWorkspaceConnectionPatch.Serialization.cs | 26 + ...MachineLearningWorkspaceConnectionPatch.cs | 25 + ...spaceConnectionProperties.Serialization.cs | 26 +- ...neLearningWorkspaceConnectionProperties.cs | 51 +- ...onnectionUsernamePassword.Serialization.cs | 22 +- ...ningWorkspaceConnectionUsernamePassword.cs | 10 +- ...hineLearningWorkspaceData.Serialization.cs | 411 ++- ...MachineLearningWorkspaceDiagnoseContent.cs | 2 +- ...rkspaceDiagnoseProperties.Serialization.cs | 54 +- ...hineLearningWorkspaceDiagnoseProperties.cs | 48 +- ...ingWorkspaceGetKeysResult.Serialization.cs | 26 +- .../MachineLearningWorkspaceGetKeysResult.cs | 22 +- ...eLearningWorkspaceGetNotebookKeysResult.cs | 8 +- ...ingWorkspaceGetStorageAccountKeysResult.cs | 4 +- ...NotebookAccessTokenResult.Serialization.cs | 48 +- ...rningWorkspaceNotebookAccessTokenResult.cs | 34 +- ...ineLearningWorkspacePatch.Serialization.cs | 70 +- .../Models/MachineLearningWorkspacePatch.cs | 47 +- .../ManagedComputeIdentity.Serialization.cs | 59 + .../Models/ManagedComputeIdentity.cs | 33 + ...edNetworkProvisionContent.Serialization.cs | 26 + .../Models/ManagedNetworkProvisionContent.cs | 21 + ...gedNetworkProvisionStatus.Serialization.cs | 63 + .../Models/ManagedNetworkProvisionStatus.cs | 32 + .../ManagedNetworkSettings.Serialization.cs | 104 + .../Models/ManagedNetworkSettings.cs | 52 + .../Generated/Models/ManagedNetworkStatus.cs | 51 + ...ializationComputeResource.Serialization.cs | 56 + .../Models/MaterializationComputeResource.cs | 28 + .../MaterializationSettings.Serialization.cs | 152 + .../Models/MaterializationSettings.cs | 60 + .../Models/MaterializationStoreType.cs | 57 + .../src/Generated/Models/MediaType.cs | 51 + .../ModelConfiguration.Serialization.cs | 71 + .../Generated/Models/ModelConfiguration.cs | 32 + .../ModelPackageContent.Serialization.cs | 102 + .../Generated/Models/ModelPackageContent.cs | 60 + .../Models/ModelPackageInput.Serialization.cs | 87 + .../src/Generated/Models/ModelPackageInput.cs | 62 + .../ModelPackageResult.Serialization.cs | 153 + .../Generated/Models/ModelPackageResult.cs | 87 + ...rmanceMetricThresholdBase.Serialization.cs | 52 + .../ModelPerformanceMetricThresholdBase.cs | 47 + .../ModelPerformanceSignal.Serialization.cs | 148 + .../Models/ModelPerformanceSignal.cs | 97 + .../src/Generated/Models/ModelTaskType.cs | 54 + ...rComputeConfigurationBase.Serialization.cs | 39 + .../Models/MonitorComputeConfigurationBase.cs | 32 + ...onitorComputeIdentityBase.Serialization.cs | 40 + .../Models/MonitorComputeIdentityBase.cs | 32 + .../Models/MonitorComputeIdentityType.cs | 51 + .../Generated/Models/MonitorComputeType.cs | 48 + .../Models/MonitorDefinition.Serialization.cs | 107 + .../src/Generated/Models/MonitorDefinition.cs | 84 + ...torServerlessSparkCompute.Serialization.cs | 65 + .../Models/MonitorServerlessSparkCompute.cs | 65 + ...tNotificationSettingsBase.Serialization.cs | 40 + ...MonitoringAlertNotificationSettingsBase.cs | 32 + .../Models/MonitoringAlertNotificationType.cs | 51 + .../MonitoringDataSegment.Serialization.cs | 90 + .../Generated/Models/MonitoringDataSegment.cs | 36 + .../Models/MonitoringFeatureDataType.cs | 51 + ...nitoringFeatureFilterBase.Serialization.cs | 41 + .../Models/MonitoringFeatureFilterBase.cs | 32 + .../Models/MonitoringFeatureFilterType.cs | 54 + .../MonitoringInputDataBase.Serialization.cs | 75 + .../Models/MonitoringInputDataBase.cs | 60 + .../Models/MonitoringInputDataType.cs | 54 + .../Generated/Models/MonitoringModelType.cs | 51 + .../Models/MonitoringNotificationMode.cs | 51 + .../MonitoringSignalBase.Serialization.cs | 69 + .../Generated/Models/MonitoringSignalBase.cs | 44 + .../Generated/Models/MonitoringSignalType.cs | 69 + .../Models/MonitoringTarget.Serialization.cs | 87 + .../src/Generated/Models/MonitoringTarget.cs | 38 + .../MonitoringThreshold.Serialization.cs | 56 + .../Generated/Models/MonitoringThreshold.cs | 28 + ...toringWorkspaceConnection.Serialization.cs | 102 + .../Models/MonitoringWorkspaceConnection.cs | 49 + .../Models/MountBindOptions.Serialization.cs | 102 + .../src/Generated/Models/MountBindOptions.cs | 36 + .../Generated/Models/NetworkingRuleAction.cs | 51 + .../NlpFixedParameters.Serialization.cs | 232 ++ .../Generated/Models/NlpFixedParameters.cs | 60 + .../Models/NlpLearningRateScheduler.cs | 66 + .../NlpParameterSubspace.Serialization.cs | 240 ++ .../Generated/Models/NlpParameterSubspace.cs | 60 + .../Models/NlpSweepSettings.Serialization.cs | 64 + .../src/Generated/Models/NlpSweepSettings.cs | 42 + .../NlpVerticalLimitSettings.Serialization.cs | 32 +- .../Models/NlpVerticalLimitSettings.cs | 10 +- .../src/Generated/Models/NodesValueType.cs | 51 + .../NotificationSetting.Serialization.cs | 134 + .../Generated/Models/NotificationSetting.cs | 50 + .../Models/NumericalDataDriftMetric.cs | 57 + ...lDataDriftMetricThreshold.Serialization.cs | 72 + .../NumericalDataDriftMetricThreshold.cs | 34 + .../Models/NumericalDataQualityMetric.cs | 54 + ...ataQualityMetricThreshold.Serialization.cs | 72 + .../NumericalDataQualityMetricThreshold.cs | 34 + .../Models/NumericalPredictionDriftMetric.cs | 57 + ...ctionDriftMetricThreshold.Serialization.cs | 72 + ...NumericalPredictionDriftMetricThreshold.cs | 34 + .../Models/OneLakeArtifact.Serialization.cs | 41 + .../src/Generated/Models/OneLakeArtifact.cs | 44 + .../Generated/Models/OneLakeArtifactType.cs | 48 + .../Models/OneLakeDatastore.Serialization.cs | 228 ++ .../src/Generated/Models/OneLakeDatastore.cs | 83 + ...ineInferenceConfiguration.Serialization.cs | 160 + .../Models/OnlineInferenceConfiguration.cs | 48 + .../Generated/Models/OutboundRuleCategory.cs | 54 + .../OutboundRuleListResult.Serialization.cs | 50 + .../Models/OutboundRuleListResult.cs | 37 + .../Generated/Models/OutboundRuleStatus.cs | 51 + .../src/Generated/Models/OutboundRuleType.cs | 54 + .../src/Generated/Models/PackageBuildState.cs | 57 + .../Models/PackageInputDeliveryMode.cs | 51 + .../PackageInputPathBase.Serialization.cs | 41 + .../Generated/Models/PackageInputPathBase.cs | 32 + .../PackageInputPathId.Serialization.cs | 64 + .../Generated/Models/PackageInputPathId.cs | 33 + .../PackageInputPathUri.Serialization.cs | 65 + .../Generated/Models/PackageInputPathUri.cs | 33 + .../PackageInputPathVersion.Serialization.cs | 87 + .../Models/PackageInputPathVersion.cs | 35 + .../src/Generated/Models/PackageInputType.cs | 51 + .../Models/PartialJobBase.Serialization.cs | 33 + .../src/Generated/Models/PartialJobBase.cs | 38 + ...artialNotificationSetting.Serialization.cs | 39 + .../Models/PartialNotificationSetting.cs | 29 + ...endingUploadCredentialDto.Serialization.cs | 30 + .../Models/PendingUploadCredentialDto.cs | 32 + .../Models/PendingUploadCredentialType.cs | 48 + .../PendingUploadRequestDto.Serialization.cs | 38 + .../Models/PendingUploadRequestDto.cs | 23 + .../PendingUploadResponseDto.Serialization.cs | 59 + .../Models/PendingUploadResponseDto.cs | 36 + .../src/Generated/Models/PendingUploadType.cs | 51 + ...nDriftMetricThresholdBase.Serialization.cs | 52 + .../PredictionDriftMetricThresholdBase.cs | 47 + ...tionDriftMonitoringSignal.Serialization.cs | 133 + .../Models/PredictionDriftMonitoringSignal.cs | 99 + .../PrivateEndpointBase.Serialization.cs | 43 + .../Generated/Models/PrivateEndpointBase.cs | 30 + ...rivateEndpointDestination.Serialization.cs | 85 + .../Models/PrivateEndpointDestination.cs | 40 + ...ivateEndpointOutboundRule.Serialization.cs | 86 + .../Models/PrivateEndpointOutboundRule.cs | 33 + .../Models/ProgressMetrics.Serialization.cs | 72 + .../src/Generated/Models/ProgressMetrics.cs | 42 + .../RandomSamplingAlgorithm.Serialization.cs | 25 +- .../Models/RandomSamplingAlgorithm.cs | 6 +- ...DistributionConfiguration.Serialization.cs | 179 + .../Models/RayDistributionConfiguration.cs | 51 + .../RegistryAcrDetails.Serialization.cs | 79 + .../Generated/Models/RegistryAcrDetails.cs | 48 + .../Models/RegistryAssetProvisioningState.cs | 63 + .../RegistryPrivateEndpoint.Serialization.cs | 66 + .../Models/RegistryPrivateEndpoint.cs | 31 + ...PrivateEndpointConnection.Serialization.cs | 197 + .../RegistryPrivateEndpointConnection.cs | 58 + ...inkServiceConnectionState.Serialization.cs | 94 + ...gistryPrivateLinkServiceConnectionState.cs | 36 + .../RegistryRegionArmDetails.Serialization.cs | 123 + .../Models/RegistryRegionArmDetails.cs | 41 + ...esourceArmPaginatedResult.Serialization.cs | 50 + ...gistryTrackedResourceArmPaginatedResult.cs | 37 + .../RegressionModelPerformanceMetric.cs | 54 + ...erformanceMetricThreshold.Serialization.cs | 72 + ...gressionModelPerformanceMetricThreshold.cs | 34 + ...egressionTrainingSettings.Serialization.cs | 17 +- .../Models/RegressionTrainingSettings.cs | 7 +- .../Models/RequestLogging.Serialization.cs | 67 + .../src/Generated/Models/RequestLogging.cs | 32 + .../src/Generated/Models/RollingRateType.cs | 60 + .../Models/SasCredentialDto.Serialization.cs | 45 + .../src/Generated/Models/SasCredentialDto.cs | 33 + .../Generated/Models/ScheduleActionType.cs | 6 + .../SecretConfiguration.Serialization.cs | 80 + .../Generated/Models/SecretConfiguration.cs | 40 + .../src/Generated/Models/SecretsType.cs | 6 + .../Models/ServiceManagedResourcesSettings.cs | 6 +- ...spaceConnectionProperties.Serialization.cs | 117 + ...alAuthTypeWorkspaceConnectionProperties.cs | 37 + .../ServiceTagDestination.Serialization.cs | 97 + .../Generated/Models/ServiceTagDestination.cs | 48 + .../ServiceTagOutboundRule.Serialization.cs | 86 + .../Models/ServiceTagOutboundRule.cs | 33 + .../Models/SparkJob.Serialization.cs | 694 ++++ .../src/Generated/Models/SparkJob.cs | 147 + .../Models/SparkJobEntry.Serialization.cs | 40 + .../src/Generated/Models/SparkJobEntry.cs | 32 + .../src/Generated/Models/SparkJobEntryType.cs | 51 + .../SparkJobPythonEntry.Serialization.cs | 49 + .../Generated/Models/SparkJobPythonEntry.cs | 39 + .../SparkJobScalaEntry.Serialization.cs | 49 + .../Generated/Models/SparkJobScalaEntry.cs | 39 + ...parkResourceConfiguration.Serialization.cs | 67 + .../Models/SparkResourceConfiguration.cs | 32 + .../Models/StaticInputData.Serialization.cs | 155 + .../src/Generated/Models/StaticInputData.cs | 56 + .../StorageAccountDetails.Serialization.cs | 79 + .../Generated/Models/StorageAccountDetails.cs | 48 + .../SystemCreatedAcrAccount.Serialization.cs | 102 + .../Models/SystemCreatedAcrAccount.cs | 52 + ...stemCreatedStorageAccount.Serialization.cs | 132 + .../Models/SystemCreatedStorageAccount.cs | 81 + .../TableFixedParameters.Serialization.cs | 477 +++ .../Generated/Models/TableFixedParameters.cs | 104 + .../TableParameterSubspace.Serialization.cs | 493 +++ .../Models/TableParameterSubspace.cs | 104 + .../TableSweepSettings.Serialization.cs | 64 + .../Generated/Models/TableSweepSettings.cs | 42 + ...ableVerticalLimitSettings.Serialization.cs | 47 +- .../Models/TableVerticalLimitSettings.cs | 14 +- .../Generated/Models/TextAnnotationType.cs | 51 + .../TextClassification.Serialization.cs | 82 +- .../Generated/Models/TextClassification.cs | 16 +- ...tClassificationMultilabel.Serialization.cs | 82 +- .../Models/TextClassificationMultilabel.cs | 16 +- .../Generated/Models/TextNer.Serialization.cs | 82 +- .../src/Generated/Models/TextNer.cs | 16 +- .../Models/TmpfsOptions.Serialization.cs | 48 + .../src/Generated/Models/TmpfsOptions.cs | 28 + ...TopNFeaturesByAttribution.Serialization.cs | 56 + .../Models/TopNFeaturesByAttribution.cs | 31 + .../Models/TrailingInputData.Serialization.cs | 155 + .../src/Generated/Models/TrailingInputData.cs | 56 + .../src/Generated/Models/TrainingMode.cs | 54 + .../TritonInferencingServer.Serialization.cs | 64 + .../Models/TritonInferencingServer.cs | 31 + ...nownBaseEnvironmentSource.Serialization.cs | 41 + .../Models/UnknownBaseEnvironmentSource.cs | 20 + ...chDeploymentConfiguration.Serialization.cs | 41 + .../UnknownBatchDeploymentConfiguration.cs | 20 + ...aDriftMetricThresholdBase.Serialization.cs | 64 + .../UnknownDataDriftMetricThresholdBase.cs | 21 + .../UnknownDataImportSource.Serialization.cs | 64 + .../Models/UnknownDataImportSource.cs | 21 + ...ualityMetricThresholdBase.Serialization.cs | 64 + .../UnknownDataQualityMetricThresholdBase.cs | 21 + .../UnknownExportSummary.Serialization.cs | 86 + .../Generated/Models/UnknownExportSummary.cs | 26 + .../UnknownInferencingServer.Serialization.cs | 41 + .../Models/UnknownInferencingServer.cs | 20 + ...abelingJobMediaProperties.Serialization.cs | 41 + .../UnknownLabelingJobMediaProperties.cs | 20 + ...nownMLAssistConfiguration.Serialization.cs | 41 + .../Models/UnknownMLAssistConfiguration.cs | 20 + ...rmanceMetricThresholdBase.Serialization.cs | 64 + ...nownModelPerformanceMetricThresholdBase.cs | 21 + ...rComputeConfigurationBase.Serialization.cs | 41 + .../UnknownMonitorComputeConfigurationBase.cs | 20 + ...onitorComputeIdentityBase.Serialization.cs | 41 + .../UnknownMonitorComputeIdentityBase.cs | 20 + ...tNotificationSettingsBase.Serialization.cs | 41 + ...MonitoringAlertNotificationSettingsBase.cs | 20 + ...nitoringFeatureFilterBase.Serialization.cs | 41 + .../UnknownMonitoringFeatureFilterBase.cs | 20 + ...wnMonitoringInputDataBase.Serialization.cs | 116 + .../Models/UnknownMonitoringInputDataBase.cs | 27 + ...knownMonitoringSignalBase.Serialization.cs | 91 + .../Models/UnknownMonitoringSignalBase.cs | 24 + .../Models/UnknownNodes.Serialization.cs | 41 + .../src/Generated/Models/UnknownNodes.cs | 20 + .../UnknownOneLakeArtifact.Serialization.cs | 49 + .../Models/UnknownOneLakeArtifact.cs | 21 + .../UnknownOutboundRule.Serialization.cs | 71 + .../Generated/Models/UnknownOutboundRule.cs | 22 + ...knownPackageInputPathBase.Serialization.cs | 41 + .../Models/UnknownPackageInputPathBase.cs | 20 + ...endingUploadCredentialDto.Serialization.cs | 32 + .../UnknownPendingUploadCredentialDto.cs | 20 + ...nDriftMetricThresholdBase.Serialization.cs | 64 + ...knownPredictionDriftMetricThresholdBase.cs | 21 + .../UnknownSparkJobEntry.Serialization.cs | 41 + .../Generated/Models/UnknownSparkJobEntry.cs | 20 + .../Models/UnknownWebhook.Serialization.cs | 64 + .../src/Generated/Models/UnknownWebhook.cs | 21 + ...aceConnectionPropertiesV2.Serialization.cs | 51 +- .../UnknownWorkspaceConnectionPropertiesV2.cs | 8 +- .../UserCreatedAcrAccount.Serialization.cs | 56 + .../Generated/Models/UserCreatedAcrAccount.cs | 44 + ...UserCreatedStorageAccount.Serialization.cs | 56 + .../Models/UserCreatedStorageAccount.cs | 44 + .../Models/VolumeDefinition.Serialization.cs | 185 + .../src/Generated/Models/VolumeDefinition.cs | 79 + .../Generated/Models/VolumeDefinitionType.cs | 57 + .../Models/VolumeOptions.Serialization.cs | 56 + .../src/Generated/Models/VolumeOptions.cs | 28 + ...kspaceConnectionAccessKey.Serialization.cs | 55 + .../Models/WorkspaceConnectionAccessKey.cs | 32 + ...WorkspaceConnectionApiKey.Serialization.cs | 44 + .../Models/WorkspaceConnectionApiKey.cs | 28 + ...esourceArmPaginatedResult.Serialization.cs | 14 +- ...ertiesV2BasicResourceArmPaginatedResult.cs | 10 +- ...onnectionServicePrincipal.Serialization.cs | 71 + .../WorkspaceConnectionServicePrincipal.cs | 38 + .../WorkspaceHubConfig.Serialization.cs | 70 + .../Generated/Models/WorkspaceHubConfig.cs | 36 + .../WorkspaceListResult.Serialization.cs | 14 +- .../Generated/Models/WorkspaceListResult.cs | 10 +- .../BatchDeploymentsRestOperations.cs | 2 +- .../BatchEndpointsRestOperations.cs | 2 +- .../CodeContainersRestOperations.cs | 2 +- .../CodeVersionsRestOperations.cs | 137 +- .../ComponentContainersRestOperations.cs | 2 +- .../ComponentVersionsRestOperations.cs | 30 +- .../RestOperations/ComputeRestOperations.cs | 174 +- .../DataContainersRestOperations.cs | 2 +- .../DataVersionsRestOperations.cs | 30 +- .../DatastoresRestOperations.cs | 2 +- .../EnvironmentContainersRestOperations.cs | 2 +- .../EnvironmentVersionsRestOperations.cs | 30 +- .../RestOperations/FeaturesRestOperations.cs | 347 ++ .../FeaturesetContainersRestOperations.cs | 501 +++ .../FeaturesetVersionsRestOperations.cs | 843 +++++ ...turestoreEntityContainersRestOperations.cs | 501 +++ ...eaturestoreEntityVersionsRestOperations.cs | 545 +++ .../RestOperations/JobsRestOperations.cs | 138 +- .../LabelingJobsRestOperations.cs | 708 ++++ .../ManagedNetworkProvisionsRestOperations.cs | 119 + ...anagedNetworkSettingsRuleRestOperations.cs | 445 +++ .../ModelContainersRestOperations.cs | 2 +- .../ModelVersionsRestOperations.cs | 121 +- .../OnlineDeploymentsRestOperations.cs | 2 +- .../OnlineEndpointsRestOperations.cs | 6 +- ...rivateEndpointConnectionsRestOperations.cs | 136 +- .../PrivateLinkResourcesRestOperations.cs | 18 +- .../RestOperations/QuotasRestOperations.cs | 2 +- .../RegistriesRestOperations.cs | 717 ++++ .../RegistryCodeContainersRestOperations.cs | 453 +++ .../RegistryCodeVersionsRestOperations.cs | 596 +++ ...gistryComponentContainersRestOperations.cs | 453 +++ ...RegistryComponentVersionsRestOperations.cs | 505 +++ .../RegistryDataContainersRestOperations.cs | 461 +++ .../RegistryDataVersionsRestOperations.cs | 624 ++++ ...stryEnvironmentContainersRestOperations.cs | 461 +++ ...gistryEnvironmentVersionsRestOperations.cs | 513 +++ .../RegistryModelContainersRestOperations.cs | 461 +++ .../RegistryModelVersionsRestOperations.cs | 727 ++++ .../RestOperations/SchedulesRestOperations.cs | 2 +- .../RestOperations/UsagesRestOperations.cs | 2 +- .../VirtualMachineSizesRestOperations.cs | 2 +- .../WorkspaceConnectionsRestOperations.cs | 315 +- .../WorkspaceFeaturesRestOperations.cs | 2 +- .../WorkspacesRestOperations.cs | 570 +-- .../src/autorest.md | 129 +- .../ci.mgmt.yml | 6 +- 983 files changed, 81357 insertions(+), 4010 deletions(-) create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Extensions/MachineLearningExtensions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningCodeVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningComponentVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDataVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningEnvironmentVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceResource.cs rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/{Generated => Customized}/Models/ComputeSchedules.Serialization.cs (96%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/{Generated => Customized}/Models/ComputeSchedules.cs (95%) create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/EncryptionUpdateProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionKeyVaultProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionSetting.cs rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/{ => Models}/MachineLearningPartialManagedServiceIdentity.Serialization.cs (100%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/{ => Models}/MachineLearningPartialManagedServiceIdentity.cs (100%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/{Generated => Customized}/Models/MachineLearningPublicNetworkAccess.cs (99%) rename sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/{Generated => Customized}/Models/MachineLearningValueFormat.cs (97%) create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspaceConnectionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspacePatch.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ExportSummaryOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentContainerOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentVersionOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetContainerOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetJobOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetVersionOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureStoreEntityContainerOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeaturestoreEntityVersionOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningLabelingJobOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOutboundRuleBasicOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeContainerOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeVersionOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataContainerOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataVersionOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentContainerOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentVersionOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelContainerOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelVersionOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ManagedNetworkProvisionStatusOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ModelPackageResultOperationSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteCondition.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSourceType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfigurationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerCommunicationProtocol.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionMode.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSourceType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailNotificationEnableType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariableType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportFormatType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureDataType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreJobType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageAnnotationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IncrementalDataRefresh.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServerType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InputPathType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProtectionLevel.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IsolationMode.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobProvisioningState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessageLevel.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobTier.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategoryMultiSelect.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogTrainingMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogValidationLoss.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionCollectionGetAllOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerCollectionGetAllOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionCollectionGetAllOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLogger.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLoggerState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobCollectionGetAllOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLabelingJobData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRuleBasicData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryModelVersionCollectionGetAllOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhookType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationStoreType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MediaType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelTaskType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureDataType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringModelType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringNotificationMode.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NetworkingRuleAction.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpLearningRateScheduler.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodesValueType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifactType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleCategory.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageBuildState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputDeliveryMode.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAssetProvisioningState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetric.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingRateType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntryType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextAnnotationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingMode.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinitionType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/LabelingJobsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 9a71dd1082e04..1b363636db590 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -873,6 +873,14 @@ "dpm" ] }, + { + "filename": "**/sdk/recoveryservices-datareplication/**/*.cs", + "words": [ + "dras", + "nics", + "reprotect" + ] + }, { "filename": "**/sdk/recoveryservices-siterecovery/**/*.cs", "words": [ diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md index 033b728fd3f4e..3bb062a60d8b3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 1.2.0-beta.2 (2023-09-29) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-2022-10' to 'package-preview-2023-06'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/machinelearningservices/resource-manager/readme.md ### Other Changes +- Upgraded Azure.Core from 1.32.0 to 1.35.0 +- Upgraded Azure.ResourceManager from 1.6.0 to 1.7.0 + ## 1.2.0-beta.1 (2023-05-30) ### Features Added @@ -77,4 +78,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs index 9fd2221db18c1..02e73deaab31f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs @@ -142,8 +142,12 @@ protected MachineLearningCodeVersionCollection() { } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string hash = null, string hashVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string orderBy, int? top, string skip, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string hash = null, string hashVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string orderBy, int? top, string skip, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -162,6 +166,8 @@ public partial class MachineLearningCodeVersionResource : Azure.ResourceManager. protected MachineLearningCodeVersionResource() { } public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response CreateOrGetStartPendingUpload(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrGetStartPendingUploadAsync(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -217,8 +223,12 @@ protected MachineLearningComponentVersionCollection() { } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string orderBy, int? top, string skip, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string orderBy, int? top, string skip, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -292,6 +302,10 @@ protected MachineLearningComputeResource() { } public virtual System.Threading.Tasks.Task StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateCustomServices(System.Collections.Generic.IEnumerable customServices, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpdateCustomServicesAsync(System.Collections.Generic.IEnumerable customServices, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateIdleShutdownSetting(Azure.ResourceManager.MachineLearning.Models.IdleShutdownSetting idleShutdownSetting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpdateIdleShutdownSettingAsync(Azure.ResourceManager.MachineLearning.Models.IdleShutdownSetting idleShutdownSetting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MachineLearningDataContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -380,8 +394,12 @@ protected MachineLearningDataVersionCollection() { } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string orderBy, int? top, string skip, string tags, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string orderBy, int? top, string skip, string tags, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -455,8 +473,12 @@ protected MachineLearningEnvironmentVersionCollection() { } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string orderBy, int? top, string skip, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string orderBy, int? top, string skip, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -497,14 +519,35 @@ public static partial class MachineLearningExtensions public static Azure.ResourceManager.MachineLearning.MachineLearningDataVersionResource GetMachineLearningDataVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerResource GetMachineLearningEnvironmentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionResource GetMachineLearningEnvironmentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureResource GetMachineLearningFeatureResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerResource GetMachineLearningFeatureSetContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionResource GetMachineLearningFeatureSetVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerResource GetMachineLearningFeatureStoreEntityContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionResource GetMachineLearningFeaturestoreEntityVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningJobResource GetMachineLearningJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobResource GetMachineLearningLabelingJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningModelContainerResource GetMachineLearningModelContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningModelVersionResource GetMachineLearningModelVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentResource GetMachineLearningOnlineDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointResource GetMachineLearningOnlineEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicResource GetMachineLearningOutboundRuleBasicResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetMachineLearningQuotas(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetMachineLearningQuotasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryCollection GetMachineLearningRegistries(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetMachineLearningRegistries(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMachineLearningRegistriesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetMachineLearningRegistry(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetMachineLearningRegistryAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryCodeContainerResource GetMachineLearningRegistryCodeContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryCodeVersionResource GetMachineLearningRegistryCodeVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryDataContainerResource GetMachineLearningRegistryDataContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryDataVersionResource GetMachineLearningRegistryDataVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryEnvironmentContainerResource GetMachineLearningRegistryEnvironmentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryEnvironmentVersionResource GetMachineLearningRegistryEnvironmentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryModelContainerResource GetMachineLearningRegistryModelContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryModelVersionResource GetMachineLearningRegistryModelVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryResource GetMachineLearningRegistryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningScheduleResource GetMachineLearningScheduleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetMachineLearningUsages(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetMachineLearningUsagesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -515,11 +558,204 @@ public static partial class MachineLearningExtensions public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceCollection GetMachineLearningWorkspaces(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetMachineLearningWorkspaces(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetMachineLearningWorkspacesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetMachineLearningWorkspaces(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip = null, string kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.Pageable GetMachineLearningWorkspaces(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip, System.Threading.CancellationToken cancellationToken) { throw null; } + public static Azure.AsyncPageable GetMachineLearningWorkspacesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip = null, string kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AsyncPageable GetMachineLearningWorkspacesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip, System.Threading.CancellationToken cancellationToken) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentContainerResource GetMachineLearninRegistryComponentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentVersionResource GetMachineLearninRegistryComponentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable UpdateMachineLearningQuotas(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable UpdateMachineLearningQuotasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MachineLearningFeatureCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningFeatureCollection() { } + public virtual Azure.Response Exists(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, string tags = null, string featureName = null, string description = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string tags = null, string featureName = null, string description = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningFeatureData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningFeatureData(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningFeatureResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningFeatureResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string featureName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningFeatureSetContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningFeatureSetContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningFeatureSetContainerData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningFeatureSetContainerData(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningFeatureSetContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningFeatureSetContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningFeatureSetVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningFeatureSetVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionCollection GetMachineLearningFeatureSetVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningFeatureSetVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningFeatureSetVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningFeatureSetVersionData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningFeatureSetVersionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningFeatureSetVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningFeatureSetVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation Backfill(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.FeatureSetVersionBackfillContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BackfillAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.FeatureSetVersionBackfillContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningFeature(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningFeatureAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureCollection GetMachineLearningFeatures() { throw null; } + public virtual Azure.Pageable GetMaterializationJobs(string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMaterializationJobsAsync(string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningFeatureStoreEntityContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningFeatureStoreEntityContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningFeatureStoreEntityContainerData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningFeatureStoreEntityContainerData(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningFeatureStoreEntityContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningFeatureStoreEntityContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningFeaturestoreEntityVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningFeaturestoreEntityVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionCollection GetMachineLearningFeaturestoreEntityVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningFeaturestoreEntityVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningFeaturestoreEntityVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningFeaturestoreEntityVersionData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningFeaturestoreEntityVersionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityVersionProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningFeaturestoreEntityVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningFeaturestoreEntityVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class MachineLearningJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected MachineLearningJobCollection() { } @@ -528,8 +764,12 @@ protected MachineLearningJobCollection() { } public virtual Azure.Response Exists(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, string jobType = null, string tag = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string jobType = null, string tag = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string skip, string jobType, string tag, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string skip, string jobType, string tag, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -555,8 +795,54 @@ protected MachineLearningJobResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningJobData data, System.Threading.CancellationToken cancellationToken) { throw null; } + } + public partial class MachineLearningLabelingJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningLabelingJobCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningLabelingJobData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningLabelingJobData(Azure.ResourceManager.MachineLearning.Models.LabelingJobProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.LabelingJobProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningLabelingJobResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningLabelingJobResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string id) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ExportLabels(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ExportSummary body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExportLabelsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ExportSummary body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Pause(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task PauseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resume(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResumeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MachineLearningModelContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -606,9 +892,9 @@ protected MachineLearningModelVersionCollection() { } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, string orderBy = null, int? top = default(int?), string version = null, string description = null, int? offset = default(int?), string tags = null, string properties = null, string feed = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string orderBy = null, int? top = default(int?), string version = null, string description = null, int? offset = default(int?), string tags = null, string properties = null, string feed = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -632,6 +918,8 @@ protected MachineLearningModelVersionResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Package(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ModelPackageContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PackageAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ModelPackageContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -740,6 +1028,42 @@ protected MachineLearningOnlineEndpointResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatchWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatchWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MachineLearningOutboundRuleBasicCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningOutboundRuleBasicCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ruleName, Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ruleName, Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningOutboundRuleBasicData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningOutboundRuleBasicData(Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule Properties { get { throw null; } set { } } + } + public partial class MachineLearningOutboundRuleBasicResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningOutboundRuleBasicResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class MachineLearningPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected MachineLearningPrivateEndpointConnectionCollection() { } @@ -786,6 +1110,342 @@ protected MachineLearningPrivateEndpointConnectionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MachineLearningRegistryCodeContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryCodeContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string codeName, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string codeName, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryCodeContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryCodeContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string codeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningRegistryCodeVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryCodeVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryCodeVersionCollection GetMachineLearningRegistryCodeVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryCodeVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryCodeVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryCodeVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryCodeVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response CreateOrGetStartPendingUpload(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrGetStartPendingUploadAsync(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string registryName, Azure.ResourceManager.MachineLearning.MachineLearningRegistryData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string registryName, Azure.ResourceManager.MachineLearning.MachineLearningRegistryData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string registryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryData : Azure.ResourceManager.Models.TrackedResourceData + { + public MachineLearningRegistryData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public System.Uri DiscoveryUri { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public string IntellectualPropertyPublisher { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ManagedResourceId { get { throw null; } set { } } + public System.Uri MlFlowRegistryUri { get { throw null; } set { } } + public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } set { } } + public string PublicNetworkAccess { get { throw null; } set { } } + public System.Collections.Generic.IList RegionDetails { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + } + public partial class MachineLearningRegistryDataContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryDataContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryDataContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryDataContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningRegistryDataVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryDataVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryDataVersionCollection GetMachineLearningRegistryDataVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryDataVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryDataVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryDataVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryDataVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response CreateOrGetStartPendingUpload(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrGetStartPendingUploadAsync(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string name, string version) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryEnvironmentContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryEnvironmentContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string environmentName, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string environmentName, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryEnvironmentContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryEnvironmentContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string environmentName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningRegistryEnvironmentVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryEnvironmentVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryEnvironmentVersionCollection GetMachineLearningRegistryEnvironmentVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryEnvironmentVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryEnvironmentVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryEnvironmentVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryEnvironmentVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryModelContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryModelContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string modelName, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string modelName, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryModelContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryModelContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string modelName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningRegistryModelVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryModelVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryModelVersionCollection GetMachineLearningRegistryModelVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryModelVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningRegistryModelVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.MachineLearningRegistryModelVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningRegistryModelVersionCollectionGetAllOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearningRegistryModelVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryModelVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response CreateOrGetStartPendingUpload(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrGetStartPendingUploadAsync(Azure.ResourceManager.MachineLearning.Models.PendingUploadRequestDto body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Package(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ModelPackageContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PackageAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ModelPackageContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningRegistryResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningRegistryResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningRegistryCodeContainer(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryCodeContainerAsync(string codeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryCodeContainerCollection GetMachineLearningRegistryCodeContainers() { throw null; } + public virtual Azure.Response GetMachineLearningRegistryDataContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryDataContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryDataContainerCollection GetMachineLearningRegistryDataContainers() { throw null; } + public virtual Azure.Response GetMachineLearningRegistryEnvironmentContainer(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryEnvironmentContainerAsync(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryEnvironmentContainerCollection GetMachineLearningRegistryEnvironmentContainers() { throw null; } + public virtual Azure.Response GetMachineLearningRegistryModelContainer(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningRegistryModelContainerAsync(string modelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningRegistryModelContainerCollection GetMachineLearningRegistryModelContainers() { throw null; } + public virtual Azure.Response GetMachineLearninRegistryComponentContainer(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearninRegistryComponentContainerAsync(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentContainerCollection GetMachineLearninRegistryComponentContainers() { throw null; } + public virtual Azure.ResourceManager.ArmOperation RemoveRegions(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningRegistryData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveRegionsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningRegistryData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.MachineLearning.Models.MachineLearningRegistryPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningRegistryPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class MachineLearningScheduleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected MachineLearningScheduleCollection() { } @@ -830,8 +1490,12 @@ protected MachineLearningWorkspaceCollection() { } public virtual Azure.Response Exists(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, string kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string skip, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string skip, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -872,7 +1536,13 @@ protected MachineLearningWorkspaceConnectionResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MachineLearningWorkspaceData : Azure.ResourceManager.Models.TrackedResourceData @@ -880,30 +1550,45 @@ public partial class MachineLearningWorkspaceData : Azure.ResourceManager.Models public MachineLearningWorkspaceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public bool? AllowPublicAccessWhenBehindVnet { get { throw null; } set { } } public string ApplicationInsights { get { throw null; } set { } } + public System.Collections.Generic.IList AssociatedWorkspaces { get { throw null; } } + public System.Collections.Generic.IList ContainerRegistries { get { throw null; } } public string ContainerRegistry { get { throw null; } set { } } public int? CosmosDbCollectionsThroughput { get { throw null; } set { } } public string Description { get { throw null; } set { } } public System.Uri DiscoveryUri { get { throw null; } set { } } + public bool? EnableDataIsolation { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting Encryption { get { throw null; } set { } } + public System.Collections.Generic.IList ExistingWorkspaces { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.FeatureStoreSettings FeatureStoreSettings { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier HubResourceId { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string ImageBuildCompute { get { throw null; } set { } } public bool? IsHbiWorkspace { get { throw null; } set { } } public bool? IsStorageHnsEnabled { get { throw null; } } public bool? IsV1LegacyMode { get { throw null; } set { } } public string KeyVault { get { throw null; } set { } } + public System.Collections.Generic.IList KeyVaults { get { throw null; } } + public string Kind { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings ManagedNetwork { get { throw null; } set { } } public System.Uri MlFlowTrackingUri { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo NotebookInfo { get { throw null; } } public string PrimaryUserAssignedIdentity { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public int? PrivateLinkCount { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? ProvisioningState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get { throw null; } set { } } public string ServiceProvisionedResourceGroup { get { throw null; } } public System.Collections.Generic.IList SharedPrivateLinkResources { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + public int? SoftDeleteRetentionInDays { get { throw null; } set { } } public string StorageAccount { get { throw null; } set { } } + public System.Collections.Generic.IList StorageAccounts { get { throw null; } } + public string SystemDatastoresAuthMode { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.WorkspaceHubConfig WorkspaceHubConfig { get { throw null; } set { } } public string WorkspaceId { get { throw null; } } } public partial class MachineLearningWorkspaceResource : Azure.ResourceManager.ArmResource @@ -915,8 +1600,12 @@ protected MachineLearningWorkspaceResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceToPurge = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceToPurge = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual Azure.ResourceManager.ArmOperation Diagnose(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceDiagnoseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DiagnoseAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceDiagnoseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -944,15 +1633,27 @@ protected MachineLearningWorkspaceResource() { } public virtual Azure.Response GetMachineLearningEnvironmentContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningEnvironmentContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerCollection GetMachineLearningEnvironmentContainers() { throw null; } + public virtual Azure.Response GetMachineLearningFeatureSetContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningFeatureSetContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerCollection GetMachineLearningFeatureSetContainers() { throw null; } + public virtual Azure.Response GetMachineLearningFeatureStoreEntityContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningFeatureStoreEntityContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerCollection GetMachineLearningFeatureStoreEntityContainers() { throw null; } public virtual Azure.Response GetMachineLearningJob(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningJobAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningJobCollection GetMachineLearningJobs() { throw null; } + public virtual Azure.Response GetMachineLearningLabelingJob(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningLabelingJobAsync(string id, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobCollection GetMachineLearningLabelingJobs() { throw null; } public virtual Azure.Response GetMachineLearningModelContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningModelContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningModelContainerCollection GetMachineLearningModelContainers() { throw null; } public virtual Azure.Response GetMachineLearningOnlineEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningOnlineEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointCollection GetMachineLearningOnlineEndpoints() { throw null; } + public virtual Azure.Response GetMachineLearningOutboundRuleBasic(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningOutboundRuleBasicAsync(string ruleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicCollection GetMachineLearningOutboundRuleBasics() { throw null; } public virtual Azure.Response GetMachineLearningPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionCollection GetMachineLearningPrivateEndpointConnections() { throw null; } @@ -976,6 +1677,8 @@ protected MachineLearningWorkspaceResource() { } public virtual Azure.AsyncPageable GetWorkspaceFeaturesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation PrepareNotebook(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PrepareNotebookAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ProvisionManagedNetworkManagedNetworkProvision(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkProvisionContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ProvisionManagedNetworkManagedNetworkProvisionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkProvisionContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ResyncKeys(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -985,9 +1688,79 @@ protected MachineLearningWorkspaceResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspacePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspacePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MachineLearninRegistryComponentContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearninRegistryComponentContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearninRegistryComponentContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearninRegistryComponentContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string componentName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearninRegistryComponentVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearninRegistryComponentVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentVersionCollection GetMachineLearninRegistryComponentVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearninRegistryComponentVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearninRegistryComponentVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string stage = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class MachineLearninRegistryComponentVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearninRegistryComponentVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.MachineLearning.Models { + public partial class AccessKeyAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties + { + public AccessKeyAuthTypeWorkspaceConnectionProperties() { } + public Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionAccessKey Credentials { get { throw null; } set { } } + } public partial class AmlCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { public AmlCompute() { } @@ -1035,31 +1808,51 @@ public partial class AmlToken : Azure.ResourceManager.MachineLearning.Models.Mac { public AmlToken() { } } + public partial class AmlTokenComputeIdentity : Azure.ResourceManager.MachineLearning.Models.MonitorComputeIdentityBase + { + public AmlTokenComputeIdentity() { } + } + public partial class ApiKeyAuthWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties + { + public ApiKeyAuthWorkspaceConnectionProperties() { } + public string CredentialsKey { get { throw null; } set { } } + } public static partial class ArmMachineLearningModelFactory { public static Azure.ResourceManager.MachineLearning.Models.AmlCompute AmlCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.AmlComputeProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.AmlComputeNodeInformation AmlComputeNodeInformation(string nodeId = null, System.Net.IPAddress privateIPAddress = null, System.Net.IPAddress publicIPAddress = null, int? port = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState? nodeState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState?), string runId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.AmlComputeProperties AmlComputeProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType? osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType?), string vmSize = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority? vmPriority = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority?), string virtualMachineImageId = null, bool? isolatedNetwork = default(bool?), Azure.ResourceManager.MachineLearning.Models.AmlComputeScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningUserAccountCredentials userAccountCredentials = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess? remoteLoginPortPublicAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAllocationState? allocationState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningAllocationState?), System.DateTimeOffset? allocationStateTransitionOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, int? currentNodeCount = default(int?), int? targetNodeCount = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeStateCounts nodeStateCounts = null, bool? enableNodePublicIP = default(bool?), System.BinaryData propertyBag = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.AutoMLJob AutoMLJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null, Azure.ResourceManager.MachineLearning.Models.AutoMLVertical taskDetails = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLJob AutoMLJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary secretsConfiguration = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.JobQueueSettings queueSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null, Azure.ResourceManager.MachineLearning.Models.AutoMLVertical taskDetails = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.BlobReferenceForConsumptionDto BlobReferenceForConsumptionDto(System.Uri blobUri = null, Azure.ResourceManager.MachineLearning.Models.PendingUploadCredentialDto credential = null, Azure.Core.ResourceIdentifier storageAccountArmId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.CocoExportSummary CocoExportSummary(System.DateTimeOffset? endOn = default(System.DateTimeOffset?), long? exportedRowCount = default(long?), string labelingJobId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string containerName = null, string snapshotPath = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.CsvExportSummary CsvExportSummary(System.DateTimeOffset? endOn = default(System.DateTimeOffset?), long? exportedRowCount = default(long?), string labelingJobId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string containerName = null, string snapshotPath = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.DatasetExportSummary DatasetExportSummary(System.DateTimeOffset? endOn = default(System.DateTimeOffset?), long? exportedRowCount = default(long?), string labelingJobId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), string labeledAssetName = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ExportSummary ExportSummary(System.DateTimeOffset? endOn = default(System.DateTimeOffset?), long? exportedRowCount = default(long?), string format = "Unknown", string labelingJobId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.HdfsDatastore HdfsDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, bool? isDefault = default(bool?), string hdfsServerCertificate = null, string nameNodeAddress = null, string protocol = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ImageMetadata ImageMetadata(string currentImageVersion = null, string latestImageVersion = null, bool? isLatestOSImageVersion = default(bool?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.JobStatusMessage JobStatusMessage(string code = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel? level = default(Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel?), string message = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.LabelingJobProperties LabelingJobProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary secretsConfiguration = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.LabelingDataConfiguration dataConfiguration = null, System.Uri jobInstructionsUri = null, System.Collections.Generic.IDictionary labelCategories = null, Azure.ResourceManager.MachineLearning.Models.LabelingJobMediaProperties labelingJobMediaProperties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningAssistConfiguration mlAssistConfiguration = null, Azure.ResourceManager.MachineLearning.Models.ProgressMetrics progressMetrics = null, System.Guid? projectId = default(System.Guid?), Azure.ResourceManager.MachineLearning.Models.JobProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.JobProvisioningState?), System.Collections.Generic.IEnumerable statusMessages = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAksCompute MachineLearningAksCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAksComputeProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAksComputeProperties MachineLearningAksComputeProperties(string clusterFqdn = null, System.Collections.Generic.IEnumerable systemServices = null, int? agentCount = default(int?), string agentVmSize = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose? clusterPurpose = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose?), Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfiguration sslConfiguration = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningAksNetworkingConfiguration aksNetworkingConfiguration = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType? loadBalancerType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType?), string loadBalancerSubnet = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAksComputeSecrets MachineLearningAksComputeSecrets(string userKubeConfig = null, string adminKubeConfig = null, string imagePullSecretName = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer MachineLearningAssetContainer(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), string accountName = null, string containerName = null, string endpoint = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string storeName = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), string accountName = null, string endpoint = null, string filesystem = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), string accountName = null, string endpoint = null, string fileShareName = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, bool? isDefault = default(bool?), string accountName = null, string containerName = null, string endpoint = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string resourceGroup = null, string subscriptionId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string storeName = null, string resourceGroup = null, string subscriptionId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, bool? isDefault = default(bool?), string accountName = null, string endpoint = null, string filesystem = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string resourceGroup = null, string subscriptionId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, bool? isDefault = default(bool?), string accountName = null, string endpoint = null, string fileShareName = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string resourceGroup = null, string subscriptionId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentData MachineLearningBatchDeploymentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, string compute = null, int? errorThreshold = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel? loggingLevel = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel?), int? maxConcurrencyPerInstance = default(int?), long? miniBatchSize = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase model = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction? outputAction = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction?), string outputFileName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentResourceConfiguration resources = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchRetrySettings retrySettings = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, string compute = null, Azure.ResourceManager.MachineLearning.Models.BatchDeploymentConfiguration deploymentConfiguration = null, int? errorThreshold = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel? loggingLevel = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel?), int? maxConcurrencyPerInstance = default(int?), long? miniBatchSize = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase model = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction? outputAction = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction?), string outputFileName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentResourceConfiguration resources = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchRetrySettings retrySettings = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointData MachineLearningBatchEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchEndpointProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchEndpointProperties MachineLearningBatchEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), string description = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, string defaultsDeploymentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData MachineLearningCodeContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData MachineLearningCodeVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJob MachineLearningCommandJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), Azure.Core.ResourceIdentifier codeId = null, string command = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration distribution = null, Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary inputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJobLimits limits = null, System.Collections.Generic.IDictionary outputs = null, System.BinaryData parameters = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeVersionProperties MachineLearningCodeVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Uri codeUri = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJob MachineLearningCommandJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary secretsConfiguration = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState? mlflowAutologger = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState?), Azure.Core.ResourceIdentifier codeId = null, string command = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration distribution = null, Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary inputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJobLimits limits = null, System.Collections.Generic.IDictionary outputs = null, System.BinaryData parameters = null, Azure.ResourceManager.MachineLearning.Models.JobQueueSettings queueSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData MachineLearningComponentContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData MachineLearningComponentVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentVersionProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentVersionProperties MachineLearningComponentVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.BinaryData componentSpec = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComputeData MachineLearningComputeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstance MachineLearningComputeInstance(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceApplication MachineLearningComputeInstanceApplication(string displayName = null, System.Uri endpointUri = null) { throw null; } @@ -1070,12 +1863,11 @@ public static partial class ArmMachineLearningModelFactory public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceDataMount MachineLearningComputeInstanceDataMount(string source = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType? sourceType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType?), string mountName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction? mountAction = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction?), string createdBy = null, string mountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState? mountState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState?), System.DateTimeOffset? mountedOn = default(System.DateTimeOffset?), string error = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceEnvironmentInfo MachineLearningComputeInstanceEnvironmentInfo(string name = null, string version = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceLastOperation MachineLearningComputeInstanceLastOperation(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName? operationName = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName?), System.DateTimeOffset? operationOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus? operationStatus = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger? operationTrigger = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceProperties MachineLearningComputeInstanceProperties(string vmSize = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy? applicationSharingPolicy = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceSshSettings sshSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceConnectivityEndpoints connectivityEndpoints = null, System.Collections.Generic.IEnumerable applications = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceCreatedBy createdBy = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState? state = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType? computeInstanceAuthorizationType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAssignedUser personalComputeInstanceAssignedUser = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScriptsToExecute scripts = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceLastOperation lastOperation = null, System.Collections.Generic.IEnumerable schedulesComputeStartStop = null, bool? enableNodePublicIP = default(bool?), System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable dataDisks = null, System.Collections.Generic.IEnumerable dataMounts = null, string versionsRuntime = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceSshSettings MachineLearningComputeInstanceSshSettings(Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess? sshPublicAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess?), string adminUserName = null, int? sshPort = default(int?), string adminPublicKey = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties MachineLearningComputeProperties(string computeType = "Unknown", string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule MachineLearningComputeStartStopSchedule(string id = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus? provisioningStatus = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction? action = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType? triggerType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType?), Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceTrigger recurrence = null, Azure.ResourceManager.MachineLearning.Models.CronTrigger cron = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase schedule = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule MachineLearningComputeStartStopSchedule(string id = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus? provisioningStatus = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction? action = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType? triggerType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType?), Azure.ResourceManager.MachineLearning.Models.ComputeStartStopRecurrenceSchedule recurrenceSchedule = null, Azure.ResourceManager.MachineLearning.Models.ComputeStartStopCronSchedule cronSchedule = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase schedule = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeSystemService MachineLearningComputeSystemService(string systemServiceType = null, string publicIPAddress = null, string version = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable passwords = null, string username = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatabricksCompute MachineLearningDatabricksCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatabricksProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatabricksComputeSecrets MachineLearningDatabricksComputeSecrets(string databricksAccessToken = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData MachineLearningDataContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataContainerProperties properties = null) { throw null; } @@ -1083,7 +1875,7 @@ public static partial class ArmMachineLearningModelFactory public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataFactoryCompute MachineLearningDataFactoryCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataLakeAnalytics MachineLearningDataLakeAnalytics(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), string dataLakeStoreAccountName = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData MachineLearningDatastoreData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, string datastoreType = "Unknown", bool? isDefault = default(bool?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, string datastoreType = "Unknown", Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, bool? isDefault = default(bool?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData MachineLearningDataVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentLogs MachineLearningDeploymentLogs(string content = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResult MachineLearningDiagnoseResult(string code = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel? level = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel?), string message = null) { throw null; } @@ -1091,47 +1883,60 @@ public static partial class ArmMachineLearningModelFactory public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthToken MachineLearningEndpointAuthToken(string accessToken = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?), string tokenType = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProperties MachineLearningEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), string description = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData MachineLearningEnvironmentContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData MachineLearningEnvironmentVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting? autoRebuild = default(Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBuildContext build = null, string condaFile = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType? environmentType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType?), string image = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerProperties inferenceConfig = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType? osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting? autoRebuild = default(Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBuildContext build = null, string condaFile = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType? environmentType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType?), string image = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerProperties inferenceConfig = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType? osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType?), Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningError MachineLearningError(Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEstimatedVmPrice MachineLearningEstimatedVmPrice(double retailPrice = 0, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType), Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier vmTier = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEstimatedVmPrices MachineLearningEstimatedVmPrices(Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency billingCurrency = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency), Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure unitOfMeasure = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure), System.Collections.Generic.IEnumerable values = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureData MachineLearningFeatureData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerData MachineLearningFeatureSetContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerProperties MachineLearningFeatureSetContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetJob MachineLearningFeatureSetJob(System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string displayName = null, System.TimeSpan? duration = default(System.TimeSpan?), string experimentId = null, Azure.ResourceManager.MachineLearning.Models.FeatureWindow featureWindow = null, string jobId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType? featureStoreJobType = default(Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionData MachineLearningFeatureSetVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionProperties MachineLearningFeatureSetVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Collections.Generic.IEnumerable entities = null, Azure.ResourceManager.MachineLearning.Models.MaterializationSettings materializationSettings = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string specificationPath = null, string stage = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerData MachineLearningFeatureStoreEntityContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerProperties MachineLearningFeatureStoreEntityContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionData MachineLearningFeaturestoreEntityVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityVersionProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityVersionProperties MachineLearningFeatureStoreEntityVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Collections.Generic.IEnumerable indexColumns = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpoint MachineLearningFqdnEndpoint(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpointDetail MachineLearningFqdnEndpointDetail(int? port = default(int?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpoints MachineLearningFqdnEndpoints(Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpointsProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpointsProperties MachineLearningFqdnEndpointsProperties(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningHDInsightCompute MachineLearningHDInsightCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningHDInsightProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningJobData MachineLearningJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties MachineLearningJobProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), string jobType = "Unknown", System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobService MachineLearningJobService(string endpoint = null, string errorMessage = null, string jobServiceType = null, int? port = default(int?), System.Collections.Generic.IDictionary properties = null, string status = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties MachineLearningJobProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), string jobType = "Unknown", Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary secretsConfiguration = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobService MachineLearningJobService(string endpoint = null, string errorMessage = null, string jobServiceType = null, Azure.ResourceManager.MachineLearning.Models.JobNodes nodes = null, int? port = default(int?), System.Collections.Generic.IDictionary properties = null, string status = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesCompute MachineLearningKubernetesCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerResourceRequirements containerResourceRequirements = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerResourceRequirements containerResourceRequirements = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningLabelingJobData MachineLearningLabelingJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.LabelingJobProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData MachineLearningModelContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData MachineLearningModelVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionProperties MachineLearningModelVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Collections.Generic.IDictionary flavors = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, string jobName = null, string modelType = null, System.Uri modelUri = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeStateCounts MachineLearningNodeStateCounts(int? idleNodeCount = default(int?), int? runningNodeCount = default(int?), int? preparingNodeCount = default(int?), int? unusableNodeCount = default(int?), int? leavingNodeCount = default(int?), int? preemptedNodeCount = default(int?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError MachineLearningNotebookPreparationError(string errorMessage = null, int? statusCode = default(int?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, string resourceId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError notebookPreparationError = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, bool? isPrivateLinkEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError notebookPreparationError = null, string resourceId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentData MachineLearningOnlineDeploymentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string endpointComputeType = "Unknown", string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string endpointComputeType = "Unknown", string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointData MachineLearningOnlineEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), string description = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, string compute = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? publicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType?), System.Collections.Generic.IDictionary traffic = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), string description = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, string compute = null, System.Collections.Generic.IDictionary mirrorTraffic = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? publicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType?), System.Collections.Generic.IDictionary traffic = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicData MachineLearningOutboundRuleBasicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPasswordDetail MachineLearningPasswordDetail(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IDictionary jobs = null, System.Collections.Generic.IDictionary outputs = null, System.BinaryData settings = null, Azure.Core.ResourceIdentifier sourceJobId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary secretsConfiguration = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IDictionary jobs = null, System.Collections.Generic.IDictionary outputs = null, System.BinaryData settings = null, Azure.Core.ResourceIdentifier sourceJobId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpoint MachineLearningPrivateEndpoint(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier subnetArmId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData MachineLearningPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpoint privateEndpoint = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateLinkResource MachineLearningPrivateLinkResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryData MachineLearningRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, System.Uri discoveryUri = null, string intellectualPropertyPublisher = null, Azure.Core.ResourceIdentifier managedResourceId = null, System.Uri mlFlowRegistryUri = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string publicNetworkAccess = null, System.Collections.Generic.IEnumerable regionDetails = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceName MachineLearningResourceName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceQuota MachineLearningResourceQuota(string id = null, string amlWorkspaceLocation = null, string resourceQuotaType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceName name = null, long? limit = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? unit = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase MachineLearningScheduleBase(string id = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState? provisioningStatus = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningScheduleData MachineLearningScheduleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProperties MachineLearningScheduleProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction action = null, string displayName = null, bool? isEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase trigger = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuCapacity MachineLearningSkuCapacity(int? @default = default(int?), int? maximum = default(int?), int? minimum = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType? scaleType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuDetail MachineLearningSkuDetail(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuCapacity capacity = null, string resourceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuSetting sku = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuSetting MachineLearningSkuSetting(string name = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier? tier = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJob MachineLearningSweepJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy earlyTermination = null, System.Collections.Generic.IDictionary inputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJobLimits limits = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective objective = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm = null, System.BinaryData searchSpace = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTrialComponent trial = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJob MachineLearningSweepJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary secretsConfiguration = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy earlyTermination = null, System.Collections.Generic.IDictionary inputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJobLimits limits = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective objective = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.JobQueueSettings queueSettings = null, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm = null, System.BinaryData searchSpace = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTrialComponent trial = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSynapseSpark MachineLearningSynapseSpark(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningSynapseSparkProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUsage MachineLearningUsage(string id = null, string amlWorkspaceLocation = null, string usageType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit? unit = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit?), long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageName name = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageName MachineLearningUsageName(string value = null, string localizedValue = null) { throw null; } @@ -1140,15 +1945,49 @@ public static partial class ArmMachineLearningModelFactory public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVirtualMachineSecrets MachineLearningVirtualMachineSecrets(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmSshCredentials administratorAccount = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmSize MachineLearningVmSize(string name = null, string family = null, int? vCpus = default(int?), int? gpus = default(int?), int? osVhdSizeMB = default(int?), int? maxResourceVolumeMB = default(int?), double? memoryGB = default(double?), bool? lowPriorityCapable = default(bool?), bool? isPremiumIOSupported = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEstimatedVmPrices estimatedVmPrices = null, System.Collections.Generic.IEnumerable supportedComputeTypes = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData MachineLearningWorkspaceConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceData MachineLearningWorkspaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, string workspaceId = null, string description = null, string friendlyName = null, string keyVault = null, string applicationInsights = null, string containerRegistry = null, string storageAccount = null, System.Uri discoveryUri = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting encryption = null, bool? isHbiWorkspace = default(bool?), string serviceProvisionedResourceGroup = null, int? privateLinkCount = default(int?), string imageBuildCompute = null, bool? allowPublicAccessWhenBehindVnet = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo notebookInfo = null, int? cosmosDbCollectionsThroughput = default(int?), string primaryUserAssignedIdentity = null, System.Guid? tenantId = default(System.Guid?), bool? isStorageHnsEnabled = default(bool?), System.Uri mlFlowTrackingUri = null, bool? isV1LegacyMode = default(bool?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceData MachineLearningWorkspaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, bool? allowPublicAccessWhenBehindVnet = default(bool?), string applicationInsights = null, System.Collections.Generic.IEnumerable associatedWorkspaces = null, System.Collections.Generic.IEnumerable containerRegistries = null, string containerRegistry = null, string description = null, System.Uri discoveryUri = null, bool? enableDataIsolation = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting encryption = null, System.Collections.Generic.IEnumerable existingWorkspaces = null, Azure.ResourceManager.MachineLearning.Models.FeatureStoreSettings featureStoreSettings = null, string friendlyName = null, bool? isHbiWorkspace = default(bool?), Azure.Core.ResourceIdentifier hubResourceId = null, string imageBuildCompute = null, string keyVault = null, System.Collections.Generic.IEnumerable keyVaults = null, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings managedNetwork = null, System.Uri mlFlowTrackingUri = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo notebookInfo = null, string primaryUserAssignedIdentity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, int? privateLinkCount = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? publicNetworkAccessType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType?), int? cosmosDbCollectionsThroughput = default(int?), string serviceProvisionedResourceGroup = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, int? softDeleteRetentionInDays = default(int?), string storageAccount = null, System.Collections.Generic.IEnumerable storageAccounts = null, bool? isStorageHnsEnabled = default(bool?), string systemDatastoresAuthMode = null, System.Guid? tenantId = default(System.Guid?), bool? isV1LegacyMode = default(bool?), Azure.ResourceManager.MachineLearning.Models.WorkspaceHubConfig workspaceHubConfig = null, string workspaceId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceDiagnoseResult MachineLearningWorkspaceDiagnoseResult(Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultValue value = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string userStorageKey = null, string userStorageResourceId = null, string appInsightsInstrumentationKey = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string appInsightsInstrumentationKey = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null, string userStorageResourceId = null, string userStorageKey = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetNotebookKeysResult MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey = null, string secondaryAccessKey = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetStorageAccountKeysResult MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string notebookResourceId = null, string hostName = null, string publicDns = null, string accessToken = null, string tokenType = null, int? expiresIn = default(int?), string refreshToken = null, string scope = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string accessToken = null, int? expiresIn = default(int?), string hostName = null, string notebookResourceId = null, string publicDns = null, string refreshToken = null, string scope = null, string tokenType = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaUpdate MachineLearningWorkspaceQuotaUpdate(string id = null, string updateWorkspaceQuotasType = null, long? limit = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? unit = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit?), Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.TextClassificationMultilabel TextClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric?), string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.TextNer TextNer(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric?), string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings ManagedNetworkSettings(Azure.ResourceManager.MachineLearning.Models.IsolationMode? isolationMode = default(Azure.ResourceManager.MachineLearning.Models.IsolationMode?), string networkId = null, System.Collections.Generic.IDictionary outboundRules = null, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkProvisionStatus status = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ModelPackageResult ModelPackageResult(Azure.ResourceManager.MachineLearning.Models.BaseEnvironmentSource baseEnvironmentSource = null, string buildId = null, Azure.ResourceManager.MachineLearning.Models.PackageBuildState? buildState = default(Azure.ResourceManager.MachineLearning.Models.PackageBuildState?), System.Collections.Generic.IReadOnlyDictionary environmentVariables = null, Azure.ResourceManager.MachineLearning.Models.InferencingServer inferencingServer = null, System.Collections.Generic.IEnumerable inputs = null, System.Uri logUri = null, Azure.ResourceManager.MachineLearning.Models.ModelConfiguration modelConfiguration = null, System.Collections.Generic.IReadOnlyDictionary tags = null, string targetEnvironmentId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.OneLakeDatastore OneLakeDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, Azure.ResourceManager.MachineLearning.Models.IntellectualProperty intellectualProperty = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.OneLakeArtifact artifact = null, string endpoint = null, string oneLakeWorkspaceName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.PendingUploadResponseDto PendingUploadResponseDto(Azure.ResourceManager.MachineLearning.Models.BlobReferenceForConsumptionDto blobReferenceForConsumption = null, string pendingUploadId = null, Azure.ResourceManager.MachineLearning.Models.PendingUploadType? pendingUploadType = default(Azure.ResourceManager.MachineLearning.Models.PendingUploadType?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.PrivateEndpointBase PrivateEndpointBase(Azure.Core.ResourceIdentifier id = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ProgressMetrics ProgressMetrics(long? completedDatapointCount = default(long?), System.DateTimeOffset? incrementalDataLastRefreshOn = default(System.DateTimeOffset?), long? skippedDatapointCount = default(long?), long? totalDatapointCount = default(long?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.RegistryPrivateEndpoint RegistryPrivateEndpoint(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier subnetArmId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.SasCredentialDto SasCredentialDto(System.Uri sasUri = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ServiceTagDestination ServiceTagDestination(Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction? action = default(Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction?), System.Collections.Generic.IEnumerable addressPrefixes = null, string portRanges = null, string protocol = null, string serviceTag = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.SparkJob SparkJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary secretsConfiguration = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), System.Collections.Generic.IEnumerable archives = null, string args = null, string codeId = null, System.Collections.Generic.IDictionary conf = null, Azure.ResourceManager.MachineLearning.Models.SparkJobEntry entry = null, string environmentId = null, System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IEnumerable jars = null, System.Collections.Generic.IDictionary outputs = null, System.Collections.Generic.IEnumerable pyFiles = null, Azure.ResourceManager.MachineLearning.Models.JobQueueSettings queueSettings = null, Azure.ResourceManager.MachineLearning.Models.SparkResourceConfiguration resources = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.TextClassificationMultilabel TextClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric?), string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.NlpFixedParameters fixedParameters = null, Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, System.Collections.Generic.IEnumerable searchSpace = null, Azure.ResourceManager.MachineLearning.Models.NlpSweepSettings sweepSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.TextNer TextNer(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric?), string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.NlpFixedParameters fixedParameters = null, Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, System.Collections.Generic.IEnumerable searchSpace = null, Azure.ResourceManager.MachineLearning.Models.NlpSweepSettings sweepSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoDeleteCondition : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoDeleteCondition(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition CreatedGreaterThan { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition LastAccessedGreaterThan { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition left, Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition left, Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AutoDeleteSetting + { + public AutoDeleteSetting() { } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteCondition? Condition { get { throw null; } set { } } + public string Value { get { throw null; } set { } } } public partial class AutoForecastHorizon : Azure.ResourceManager.MachineLearning.Models.ForecastHorizon { @@ -1160,6 +1999,7 @@ public AutoMLJob(Azure.ResourceManager.MachineLearning.Models.AutoMLVertical tas public string EnvironmentId { get { throw null; } set { } } public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.JobQueueSettings QueueSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration Resources { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.AutoMLVertical TaskDetails { get { throw null; } set { } } } @@ -1175,9 +2015,12 @@ public partial class AutoMLVerticalRegression : Azure.ResourceManager.MachineLea public AutoMLVerticalRegression(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableFixedParameters FixedParameters { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableSweepSettings SweepSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput TestData { get { throw null; } set { } } public double? TestDataSize { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.RegressionTrainingSettings TrainingSettings { get { throw null; } set { } } @@ -1265,16 +2108,62 @@ public partial class AutoTargetRollingWindowSize : Azure.ResourceManager.Machine { public AutoTargetRollingWindowSize() { } } + public partial class AzMonMonitoringAlertNotificationSettings : Azure.ResourceManager.MachineLearning.Models.MonitoringAlertNotificationSettingsBase + { + public AzMonMonitoringAlertNotificationSettings() { } + } + public partial class AzureDevOpsWebhook : Azure.ResourceManager.MachineLearning.Models.MachineLearningWebhook + { + public AzureDevOpsWebhook() { } + } + public partial class AzureMLBatchInferencingServer : Azure.ResourceManager.MachineLearning.Models.InferencingServer + { + public AzureMLBatchInferencingServer() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration CodeConfiguration { get { throw null; } set { } } + } + public partial class AzureMLOnlineInferencingServer : Azure.ResourceManager.MachineLearning.Models.InferencingServer + { + public AzureMLOnlineInferencingServer() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration CodeConfiguration { get { throw null; } set { } } + } public partial class BanditPolicy : Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy { public BanditPolicy() { } public float? SlackAmount { get { throw null; } set { } } public float? SlackFactor { get { throw null; } set { } } } + public abstract partial class BaseEnvironmentSource + { + protected BaseEnvironmentSource() { } + } + public partial class BaseEnvironmentType : Azure.ResourceManager.MachineLearning.Models.BaseEnvironmentSource + { + public BaseEnvironmentType(Azure.Core.ResourceIdentifier resourceId) { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + } + public abstract partial class BatchDeploymentConfiguration + { + protected BatchDeploymentConfiguration() { } + } + public partial class BatchPipelineComponentDeploymentConfiguration : Azure.ResourceManager.MachineLearning.Models.BatchDeploymentConfiguration + { + public BatchPipelineComponentDeploymentConfiguration() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningIdAssetReference ComponentId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Settings { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } } + } public partial class BayesianSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm { public BayesianSamplingAlgorithm() { } } + public partial class BlobReferenceForConsumptionDto + { + internal BlobReferenceForConsumptionDto() { } + public System.Uri BlobUri { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.PendingUploadCredentialDto Credential { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageAccountArmId { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BlockedTransformer : System.IEquatable { @@ -1302,13 +2191,85 @@ public BayesianSamplingAlgorithm() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ClassificationModel : System.IEquatable + public readonly partial struct CategoricalDataDriftMetric : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ClassificationModel(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ClassificationModel BernoulliNaiveBayes { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ClassificationModel DecisionTree { get { throw null; } } + public CategoricalDataDriftMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric JensenShannonDistance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric PearsonsChiSquaredTest { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric PopulationStabilityIndex { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric left, Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric left, Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CategoricalDataDriftMetricThreshold : Azure.ResourceManager.MachineLearning.Models.DataDriftMetricThresholdBase + { + public CategoricalDataDriftMetricThreshold(Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.CategoricalDataDriftMetric Metric { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CategoricalDataQualityMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CategoricalDataQualityMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric DataTypeErrorRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric NullValueRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric OutOfBoundsRate { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric left, Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric left, Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CategoricalDataQualityMetricThreshold : Azure.ResourceManager.MachineLearning.Models.DataQualityMetricThresholdBase + { + public CategoricalDataQualityMetricThreshold(Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.CategoricalDataQualityMetric Metric { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CategoricalPredictionDriftMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CategoricalPredictionDriftMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric JensenShannonDistance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric PearsonsChiSquaredTest { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric PopulationStabilityIndex { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric left, Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric left, Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CategoricalPredictionDriftMetricThreshold : Azure.ResourceManager.MachineLearning.Models.PredictionDriftMetricThresholdBase + { + public CategoricalPredictionDriftMetricThreshold(Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.CategoricalPredictionDriftMetric Metric { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClassificationModel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClassificationModel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ClassificationModel BernoulliNaiveBayes { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ClassificationModel DecisionTree { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.ClassificationModel ExtremeRandomTrees { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.ClassificationModel GradientBoosting { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.ClassificationModel KNN { get { throw null; } } @@ -1331,6 +2292,30 @@ public BayesianSamplingAlgorithm() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClassificationModelPerformanceMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClassificationModelPerformanceMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric Accuracy { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric Precision { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric Recall { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric left, Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric left, Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ClassificationModelPerformanceMetricThreshold : Azure.ResourceManager.MachineLearning.Models.ModelPerformanceMetricThresholdBase + { + public ClassificationModelPerformanceMetricThreshold(Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.ClassificationModelPerformanceMetric Metric { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ClassificationMultilabelPrimaryMetric : System.IEquatable { private readonly object _dummy; @@ -1378,10 +2363,13 @@ public partial class ClassificationTask : Azure.ResourceManager.MachineLearning. public ClassificationTask(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableFixedParameters FixedParameters { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } public string PositiveLabel { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableSweepSettings SweepSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput TestData { get { throw null; } set { } } public double? TestDataSize { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationTrainingSettings TrainingSettings { get { throw null; } set { } } @@ -1395,22 +2383,108 @@ public ClassificationTrainingSettings() { } public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } } + public partial class CocoExportSummary : Azure.ResourceManager.MachineLearning.Models.ExportSummary + { + public CocoExportSummary() { } + public string ContainerName { get { throw null; } } + public string SnapshotPath { get { throw null; } } + } public partial class ColumnTransformer { public ColumnTransformer() { } public System.Collections.Generic.IList Fields { get { throw null; } set { } } public System.BinaryData Parameters { get { throw null; } set { } } } + public partial class ComputeStartStopCronSchedule + { + public ComputeStartStopCronSchedule() { } + public string Expression { get { throw null; } set { } } + public string StartTime { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + } + public partial class ComputeStartStopRecurrenceSchedule + { + public ComputeStartStopRecurrenceSchedule() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency? Frequency { get { throw null; } set { } } + public int? Interval { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceSchedule Schedule { get { throw null; } set { } } + public string StartTime { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerCommunicationProtocol : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerCommunicationProtocol(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol Http { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol Tcp { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol Udp { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol left, Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol left, Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContainerEndpoint + { + public ContainerEndpoint() { } + public string HostIP { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ContainerCommunicationProtocol? Protocol { get { throw null; } set { } } + public int? Published { get { throw null; } set { } } + public int? Target { get { throw null; } set { } } + } + public partial class CreateMonitorAction : Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction + { + public CreateMonitorAction(Azure.ResourceManager.MachineLearning.Models.MonitorDefinition monitorDefinition) { } + public Azure.ResourceManager.MachineLearning.Models.MonitorDefinition MonitorDefinition { get { throw null; } set { } } + } public partial class CronTrigger : Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase { public CronTrigger(string expression) { } public string Expression { get { throw null; } set { } } } + public partial class CsvExportSummary : Azure.ResourceManager.MachineLearning.Models.ExportSummary + { + public CsvExportSummary() { } + public string ContainerName { get { throw null; } } + public string SnapshotPath { get { throw null; } } + } public partial class CustomForecastHorizon : Azure.ResourceManager.MachineLearning.Models.ForecastHorizon { public CustomForecastHorizon(int value) { } public int Value { get { throw null; } set { } } } + public partial class CustomInferencingServer : Azure.ResourceManager.MachineLearning.Models.InferencingServer + { + public CustomInferencingServer() { } + public Azure.ResourceManager.MachineLearning.Models.OnlineInferenceConfiguration InferenceConfiguration { get { throw null; } set { } } + } + public partial class CustomKeysWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties + { + public CustomKeysWorkspaceConnectionProperties() { } + public System.Collections.Generic.IDictionary CredentialsKeys { get { throw null; } } + } + public partial class CustomMetricThreshold + { + public CustomMetricThreshold(string metric) { } + public string Metric { get { throw null; } set { } } + public double? ThresholdValue { get { throw null; } set { } } + } + public partial class CustomMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public CustomMonitoringSignal(string componentId, System.Collections.Generic.IEnumerable metricThresholds, Azure.ResourceManager.MachineLearning.Models.MonitoringWorkspaceConnection workspaceConnection) { } + public string ComponentId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary InputAssets { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } + public System.Collections.Generic.IList MetricThresholds { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringWorkspaceConnection WorkspaceConnection { get { throw null; } set { } } + } public partial class CustomNCrossValidations : Azure.ResourceManager.MachineLearning.Models.NCrossValidations { public CustomNCrossValidations(int value) { } @@ -1421,6 +2495,17 @@ public partial class CustomSeasonality : Azure.ResourceManager.MachineLearning.M public CustomSeasonality(int value) { } public int Value { get { throw null; } set { } } } + public partial class CustomService + { + public CustomService() { } + public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.DockerSetting Docker { get { throw null; } set { } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.ImageSetting Image { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Volumes { get { throw null; } } + } public partial class CustomTargetLags : Azure.ResourceManager.MachineLearning.Models.TargetLags { public CustomTargetLags(System.Collections.Generic.IEnumerable values) { } @@ -1431,6 +2516,274 @@ public partial class CustomTargetRollingWindowSize : Azure.ResourceManager.Machi public CustomTargetRollingWindowSize(int value) { } public int Value { get { throw null; } set { } } } + public partial class DatabaseSource : Azure.ResourceManager.MachineLearning.Models.DataImportSource + { + public DatabaseSource() { } + public string Query { get { throw null; } set { } } + public string StoredProcedure { get { throw null; } set { } } + public System.Collections.Generic.IList> StoredProcedureParams { get { throw null; } set { } } + public string TableName { get { throw null; } set { } } + } + public partial class DataCollectionConfiguration + { + public DataCollectionConfiguration() { } + public string ClientId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.DataCollectionMode? DataCollectionMode { get { throw null; } set { } } + public string DataId { get { throw null; } set { } } + public double? SamplingRate { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataCollectionMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataCollectionMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.DataCollectionMode Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.DataCollectionMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.DataCollectionMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.DataCollectionMode left, Azure.ResourceManager.MachineLearning.Models.DataCollectionMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.DataCollectionMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.DataCollectionMode left, Azure.ResourceManager.MachineLearning.Models.DataCollectionMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataCollector + { + public DataCollector(System.Collections.Generic.IDictionary collections) { } + public System.Collections.Generic.IDictionary Collections { get { throw null; } } + public System.Collections.Generic.IList RequestLoggingCaptureHeaders { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RollingRateType? RollingRate { get { throw null; } set { } } + } + public abstract partial class DataDriftMetricThresholdBase + { + protected DataDriftMetricThresholdBase() { } + public double? ThresholdValue { get { throw null; } set { } } + } + public partial class DataDriftMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public DataDriftMonitoringSignal(System.Collections.Generic.IEnumerable metricThresholds, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase productionData, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase referenceData) { } + public Azure.ResourceManager.MachineLearning.Models.MonitoringDataSegment DataSegment { get { throw null; } set { } } + public System.Collections.Generic.IDictionary FeatureDataTypeOverride { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureFilterBase Features { get { throw null; } set { } } + public System.Collections.Generic.IList MetricThresholds { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ProductionData { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ReferenceData { get { throw null; } set { } } + } + public partial class DataImport : Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties + { + public DataImport(System.Uri dataUri) : base (default(System.Uri)) { } + public string AssetName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.DataImportSource Source { get { throw null; } set { } } + } + public abstract partial class DataImportSource + { + protected DataImportSource() { } + public string Connection { get { throw null; } set { } } + } + public abstract partial class DataQualityMetricThresholdBase + { + protected DataQualityMetricThresholdBase() { } + public double? ThresholdValue { get { throw null; } set { } } + } + public partial class DataQualityMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public DataQualityMonitoringSignal(System.Collections.Generic.IEnumerable metricThresholds, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase productionData, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase referenceData) { } + public System.Collections.Generic.IDictionary FeatureDataTypeOverride { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureFilterBase Features { get { throw null; } set { } } + public System.Collections.Generic.IList MetricThresholds { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ProductionData { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ReferenceData { get { throw null; } set { } } + } + public partial class DatasetExportSummary : Azure.ResourceManager.MachineLearning.Models.ExportSummary + { + public DatasetExportSummary() { } + public string LabeledAssetName { get { throw null; } } + } + public partial class DockerSetting + { + public DockerSetting() { } + public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + public bool? Privileged { get { throw null; } set { } } + } + public partial class EmailMonitoringAlertNotificationSettings : Azure.ResourceManager.MachineLearning.Models.MonitoringAlertNotificationSettingsBase + { + public EmailMonitoringAlertNotificationSettings() { } + public Azure.ResourceManager.MachineLearning.Models.NotificationSetting EmailNotificationSetting { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EmailNotificationEnableType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EmailNotificationEnableType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType JobCancelled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType JobCompleted { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType JobFailed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType left, Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType left, Azure.ResourceManager.MachineLearning.Models.EmailNotificationEnableType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EncryptionKeyVaultUpdateProperties + { + public EncryptionKeyVaultUpdateProperties(string keyIdentifier) { } + public string KeyIdentifier { get { throw null; } } + } + public partial class EncryptionUpdateProperties + { + public EncryptionUpdateProperties(Azure.ResourceManager.MachineLearning.Models.EncryptionKeyVaultUpdateProperties keyVaultProperties) { } + public EncryptionUpdateProperties(string keyIdentifier) { } + public string KeyIdentifier { get { throw null; } } + } + public partial class EnvironmentVariable + { + public EnvironmentVariable() { } + public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + public string Value { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType? VariableType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnvironmentVariableType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnvironmentVariableType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType Local { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType left, Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType left, Azure.ResourceManager.MachineLearning.Models.EnvironmentVariableType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class ExportSummary + { + protected ExportSummary() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public long? ExportedRowCount { get { throw null; } } + public string LabelingJobId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + } + public partial class FeatureAttributionDriftMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public FeatureAttributionDriftMonitoringSignal(Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetricThreshold metricThreshold, System.Collections.Generic.IEnumerable productionData, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase referenceData) { } + public Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetricThreshold MetricThreshold { get { throw null; } set { } } + public System.Collections.Generic.IList ProductionData { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ReferenceData { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FeatureAttributionMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FeatureAttributionMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric NormalizedDiscountedCumulativeGain { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric left, Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric left, Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FeatureAttributionMetricThreshold + { + public FeatureAttributionMetricThreshold(Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetric Metric { get { throw null; } set { } } + public double? ThresholdValue { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FeatureDataType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FeatureDataType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType Binary { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType Boolean { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType Datetime { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType Double { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType Float { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType Integer { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType Long { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureDataType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.FeatureDataType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.FeatureDataType left, Azure.ResourceManager.MachineLearning.Models.FeatureDataType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.FeatureDataType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.FeatureDataType left, Azure.ResourceManager.MachineLearning.Models.FeatureDataType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FeatureSetVersionBackfillContent + { + public FeatureSetVersionBackfillContent() { } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.FeatureWindow FeatureWindow { get { throw null; } set { } } + public string ResourceInstanceType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary SparkConfiguration { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FeatureStoreJobType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FeatureStoreJobType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType BackfillMaterialization { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType RecurrentMaterialization { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType left, Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType left, Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FeatureStoreSettings + { + public FeatureStoreSettings() { } + public string OfflineStoreConnectionName { get { throw null; } set { } } + public string OnlineStoreConnectionName { get { throw null; } set { } } + public string SparkRuntimeVersion { get { throw null; } set { } } + } + public partial class FeatureSubset : Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureFilterBase + { + public FeatureSubset(System.Collections.Generic.IEnumerable features) { } + public System.Collections.Generic.IList Features { get { throw null; } } + } + public partial class FeatureWindow + { + public FeatureWindow() { } + public System.DateTimeOffset? FeatureWindowEnd { get { throw null; } set { } } + public System.DateTimeOffset? FeatureWindowStart { get { throw null; } set { } } + } + public partial class FileSystemSource : Azure.ResourceManager.MachineLearning.Models.DataImportSource + { + public FileSystemSource() { } + public string Path { get { throw null; } set { } } + } + public partial class FixedInputData : Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase + { + public FixedInputData(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri) : base (default(Azure.ResourceManager.MachineLearning.Models.JobInputType), default(System.Uri)) { } + } public abstract partial class ForecastHorizon { protected ForecastHorizon() { } @@ -1500,6 +2853,7 @@ public ForecastingSettings() { } public string CountryOrRegionForHolidays { get { throw null; } set { } } public int? CvStepSize { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag? FeatureLags { get { throw null; } set { } } + public System.Collections.Generic.IList FeaturesUnknownAtForecastTime { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ForecastHorizon ForecastHorizon { get { throw null; } set { } } public string Frequency { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ForecastingSeasonality Seasonality { get { throw null; } set { } } @@ -1517,10 +2871,117 @@ public ForecastingTrainingSettings() { } public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } } + public partial class FqdnOutboundRule : Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule + { + public FqdnOutboundRule() { } + public string Destination { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct GenerationSafetyQualityMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GenerationSafetyQualityMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AcceptableCoherenceScorePerInstance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AcceptableFluencyScorePerInstance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AcceptableGroundednessScorePerInstance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AcceptableRelevanceScorePerInstance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AcceptableSimilarityScorePerInstance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AggregatedCoherencePassRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AggregatedFluencyPassRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AggregatedGroundednessPassRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AggregatedRelevancePassRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric AggregatedSimilarityPassRate { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric left, Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric left, Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GenerationSafetyQualityMetricThreshold + { + public GenerationSafetyQualityMetricThreshold(Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.GenerationSafetyQualityMetric Metric { get { throw null; } set { } } + public double? ThresholdValue { get { throw null; } set { } } + } + public partial class GenerationSafetyQualityMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public GenerationSafetyQualityMonitoringSignal(System.Collections.Generic.IEnumerable metricThresholds, double samplingRate) { } + public System.Collections.Generic.IList MetricThresholds { get { throw null; } } + public System.Collections.Generic.IList ProductionData { get { throw null; } set { } } + public double SamplingRate { get { throw null; } set { } } + public string WorkspaceConnectionId { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct GenerationTokenStatisticsMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GenerationTokenStatisticsMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric TotalTokenCount { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric TotalTokenCountPerGroup { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric left, Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric left, Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GenerationTokenStatisticsMetricThreshold + { + public GenerationTokenStatisticsMetricThreshold(Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.GenerationTokenStatisticsMetric Metric { get { throw null; } set { } } + public double? ThresholdValue { get { throw null; } set { } } + } + public partial class GenerationTokenStatisticsSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public GenerationTokenStatisticsSignal(System.Collections.Generic.IEnumerable metricThresholds, double samplingRate) { } + public System.Collections.Generic.IList MetricThresholds { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ProductionData { get { throw null; } set { } } + public double SamplingRate { get { throw null; } set { } } + } public partial class GridSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm { public GridSamplingAlgorithm() { } } + public partial class HdfsDatastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties + { + public HdfsDatastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, string nameNodeAddress) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } + public string HdfsServerCertificate { get { throw null; } set { } } + public string NameNodeAddress { get { throw null; } set { } } + public string Protocol { get { throw null; } set { } } + } + public partial class IdleShutdownSetting + { + public IdleShutdownSetting() { } + public string IdleTimeBeforeShutdown { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageAnnotationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageAnnotationType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType BoundingBox { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType Classification { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType InstanceSegmentation { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType left, Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType left, Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ImageClassification : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { public ImageClassification(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } @@ -1561,6 +3022,13 @@ public ImageLimitSettings() { } public int? MaxTrials { get { throw null; } set { } } public System.TimeSpan? Timeout { get { throw null; } set { } } } + public partial class ImageMetadata + { + internal ImageMetadata() { } + public string CurrentImageVersion { get { throw null; } } + public bool? IsLatestOSImageVersion { get { throw null; } } + public string LatestImageVersion { get { throw null; } } + } public partial class ImageModelDistributionSettings { public ImageModelDistributionSettings() { } @@ -1668,6 +3136,8 @@ public ImageModelSettingsObjectDetection() { } public int? BoxDetectionsPerImage { get { throw null; } set { } } public float? BoxScoreThreshold { get { throw null; } set { } } public int? ImageSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric? LogTrainingMetrics { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.LogValidationLoss? LogValidationLoss { get { throw null; } set { } } public int? MaxSize { get { throw null; } set { } } public int? MinSize { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize? ModelSize { get { throw null; } set { } } @@ -1690,6 +3160,13 @@ public ImageObjectDetection(Azure.ResourceManager.MachineLearning.Models.Machine public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } public double? ValidationDataSize { get { throw null; } set { } } } + public partial class ImageSetting + { + public ImageSetting() { } + public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.ImageType? ImageType { get { throw null; } set { } } + public string Reference { get { throw null; } set { } } + } public partial class ImageSweepSettings { public ImageSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType samplingAlgorithm) { } @@ -1697,6 +3174,57 @@ public ImageSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingA public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType SamplingAlgorithm { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ImageType AzureML { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ImageType Docker { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ImageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.ImageType left, Azure.ResourceManager.MachineLearning.Models.ImageType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ImageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ImageType left, Azure.ResourceManager.MachineLearning.Models.ImageType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ImportDataAction : Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction + { + public ImportDataAction(Azure.ResourceManager.MachineLearning.Models.DataImport dataImportDefinition) { } + public Azure.ResourceManager.MachineLearning.Models.DataImport DataImportDefinition { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IncrementalDataRefresh : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IncrementalDataRefresh(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh left, Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh left, Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh right) { throw null; } + public override string ToString() { throw null; } + } + public partial class IndexColumn + { + public IndexColumn() { } + public string ColumnName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.FeatureDataType? DataType { get { throw null; } set { } } + } + public abstract partial class InferencingServer + { + protected InferencingServer() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct InstanceSegmentationPrimaryMetric : System.IEquatable { private readonly object _dummy; @@ -1713,6 +3241,249 @@ public ImageSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingA public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric right) { throw null; } public override string ToString() { throw null; } } + public partial class IntellectualProperty + { + public IntellectualProperty(string publisher) { } + public Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel? ProtectionLevel { get { throw null; } set { } } + public string Publisher { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IntellectualProtectionLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IntellectualProtectionLevel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel All { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel None { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel left, Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel left, Azure.ResourceManager.MachineLearning.Models.IntellectualProtectionLevel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IsolationMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IsolationMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.IsolationMode AllowInternetOutbound { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.IsolationMode AllowOnlyApprovedOutbound { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.IsolationMode Disabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.IsolationMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.IsolationMode left, Azure.ResourceManager.MachineLearning.Models.IsolationMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.IsolationMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.IsolationMode left, Azure.ResourceManager.MachineLearning.Models.IsolationMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class JobAllNodes : Azure.ResourceManager.MachineLearning.Models.JobNodes + { + public JobAllNodes() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobInputType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobInputType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.JobInputType CustomModel { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobInputType Literal { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobInputType MlflowModel { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobInputType Mltable { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobInputType TritonModel { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobInputType UriFile { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobInputType UriFolder { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.JobInputType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.JobInputType left, Azure.ResourceManager.MachineLearning.Models.JobInputType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.JobInputType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.JobInputType left, Azure.ResourceManager.MachineLearning.Models.JobInputType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class JobNodes + { + protected JobNodes() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.JobProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.JobProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.JobProvisioningState left, Azure.ResourceManager.MachineLearning.Models.JobProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.JobProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.JobProvisioningState left, Azure.ResourceManager.MachineLearning.Models.JobProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class JobQueueSettings + { + public JobQueueSettings() { } + public Azure.ResourceManager.MachineLearning.Models.JobTier? JobTier { get { throw null; } set { } } + public int? Priority { get { throw null; } set { } } + } + public partial class JobStatusMessage + { + internal JobStatusMessage() { } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel? Level { get { throw null; } } + public string Message { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatusMessageLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatusMessageLevel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel Error { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel Information { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel left, Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel left, Azure.ResourceManager.MachineLearning.Models.JobStatusMessageLevel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobTier(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.JobTier Basic { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobTier Null { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobTier Premium { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobTier Spot { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.JobTier Standard { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.JobTier other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.JobTier left, Azure.ResourceManager.MachineLearning.Models.JobTier right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.JobTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.JobTier left, Azure.ResourceManager.MachineLearning.Models.JobTier right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KerberosKeytabCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials + { + public KerberosKeytabCredentials(Azure.ResourceManager.MachineLearning.Models.KerberosKeytabSecrets secrets, string kerberosKdcAddress, string kerberosPrincipal, string kerberosRealm) { } + public string KerberosKdcAddress { get { throw null; } set { } } + public string KerberosPrincipal { get { throw null; } set { } } + public string KerberosRealm { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.KerberosKeytabSecrets Secrets { get { throw null; } set { } } + } + public partial class KerberosKeytabSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets + { + public KerberosKeytabSecrets() { } + public string KerberosKeytab { get { throw null; } set { } } + } + public partial class KerberosPasswordCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials + { + public KerberosPasswordCredentials(Azure.ResourceManager.MachineLearning.Models.KerberosPasswordSecrets secrets, string kerberosKdcAddress, string kerberosPrincipal, string kerberosRealm) { } + public string KerberosKdcAddress { get { throw null; } set { } } + public string KerberosPrincipal { get { throw null; } set { } } + public string KerberosRealm { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.KerberosPasswordSecrets Secrets { get { throw null; } set { } } + } + public partial class KerberosPasswordSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets + { + public KerberosPasswordSecrets() { } + public string KerberosPassword { get { throw null; } set { } } + } + public partial class LabelCategory + { + public LabelCategory() { } + public System.Collections.Generic.IDictionary Classes { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect? MultiSelect { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LabelCategoryMultiSelect : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LabelCategoryMultiSelect(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect left, Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect left, Azure.ResourceManager.MachineLearning.Models.LabelCategoryMultiSelect right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LabelClass + { + public LabelClass() { } + public string DisplayName { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Subclasses { get { throw null; } set { } } + } + public partial class LabelingDataConfiguration + { + public LabelingDataConfiguration() { } + public string DataId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.IncrementalDataRefresh? IncrementalDataRefresh { get { throw null; } set { } } + } + public partial class LabelingJobImageProperties : Azure.ResourceManager.MachineLearning.Models.LabelingJobMediaProperties + { + public LabelingJobImageProperties() { } + public Azure.ResourceManager.MachineLearning.Models.ImageAnnotationType? AnnotationType { get { throw null; } set { } } + } + public abstract partial class LabelingJobMediaProperties + { + protected LabelingJobMediaProperties() { } + } + public partial class LabelingJobProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties + { + public LabelingJobProperties() { } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.LabelingDataConfiguration DataConfiguration { get { throw null; } set { } } + public System.Uri JobInstructionsUri { get { throw null; } set { } } + public System.Collections.Generic.IDictionary LabelCategories { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.LabelingJobMediaProperties LabelingJobMediaProperties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningAssistConfiguration MlAssistConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ProgressMetrics ProgressMetrics { get { throw null; } } + public System.Guid? ProjectId { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.JobProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList StatusMessages { get { throw null; } } + } + public partial class LabelingJobTextProperties : Azure.ResourceManager.MachineLearning.Models.LabelingJobMediaProperties + { + public LabelingJobTextProperties() { } + public Azure.ResourceManager.MachineLearning.Models.TextAnnotationType? AnnotationType { get { throw null; } set { } } + } + public partial class LakeHouseArtifact : Azure.ResourceManager.MachineLearning.Models.OneLakeArtifact + { + public LakeHouseArtifact(string artifactName) : base (default(string)) { } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LearningRateScheduler : System.IEquatable { @@ -1732,6 +3503,42 @@ public ImageSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingA public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler left, Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LogTrainingMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LogTrainingMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric Disable { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric Enable { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric left, Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric left, Azure.ResourceManager.MachineLearning.Models.LogTrainingMetric right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LogValidationLoss : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LogValidationLoss(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.LogValidationLoss Disable { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.LogValidationLoss Enable { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.LogValidationLoss other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.LogValidationLoss left, Azure.ResourceManager.MachineLearning.Models.LogValidationLoss right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.LogValidationLoss (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LogValidationLoss left, Azure.ResourceManager.MachineLearning.Models.LogValidationLoss right) { throw null; } + public override string ToString() { throw null; } + } public partial class MachineLearningAccountKeyDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials { public MachineLearningAccountKeyDatastoreCredentials(Azure.ResourceManager.MachineLearning.Models.MachineLearningAccountKeyDatastoreSecrets secrets) { } @@ -1775,6 +3582,10 @@ public MachineLearningAksNetworkingConfiguration() { } public string ServiceCidr { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } } + public partial class MachineLearningAllFeatures : Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureFilterBase + { + public MachineLearningAllFeatures() { } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningAllocationState : System.IEquatable { @@ -1814,6 +3625,7 @@ public MachineLearningAksNetworkingConfiguration() { } public partial class MachineLearningAssetBase : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase { public MachineLearningAssetBase() { } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting AutoDeleteSetting { get { throw null; } set { } } public bool? IsAnonymous { get { throw null; } set { } } public bool? IsArchived { get { throw null; } set { } } } @@ -1828,6 +3640,16 @@ public abstract partial class MachineLearningAssetReferenceBase { protected MachineLearningAssetReferenceBase() { } } + public abstract partial class MachineLearningAssistConfiguration + { + protected MachineLearningAssistConfiguration() { } + } + public partial class MachineLearningAssistEnabledConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssistConfiguration + { + public MachineLearningAssistEnabledConfiguration(string inferencingComputeBinding, string trainingComputeBinding) { } + public string InferencingComputeBinding { get { throw null; } set { } } + public string TrainingComputeBinding { get { throw null; } set { } } + } public partial class MachineLearningAutoPauseProperties { public MachineLearningAutoPauseProperties() { } @@ -1848,13 +3670,17 @@ public MachineLearningAzureBlobDatastore(Azure.ResourceManager.MachineLearning.M public string ContainerName { get { throw null; } set { } } public string Endpoint { get { throw null; } set { } } public string Protocol { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } } public partial class MachineLearningAzureDataLakeGen1Datastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties { public MachineLearningAzureDataLakeGen1Datastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, string storeName) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } + public string ResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } public string StoreName { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } } public partial class MachineLearningAzureDataLakeGen2Datastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties { @@ -1863,7 +3689,9 @@ public MachineLearningAzureDataLakeGen2Datastore(Azure.ResourceManager.MachineLe public string Endpoint { get { throw null; } set { } } public string Filesystem { get { throw null; } set { } } public string Protocol { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } } public partial class MachineLearningAzureFileDatastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties { @@ -1872,7 +3700,9 @@ public MachineLearningAzureFileDatastore(Azure.ResourceManager.MachineLearning.M public string Endpoint { get { throw null; } set { } } public string FileShareName { get { throw null; } set { } } public string Protocol { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } } public partial class MachineLearningBatchDeploymentPatch { @@ -1884,6 +3714,7 @@ public partial class MachineLearningBatchDeploymentProperties : Azure.ResourceMa { public MachineLearningBatchDeploymentProperties() { } public string Compute { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.BatchDeploymentConfiguration DeploymentConfiguration { get { throw null; } set { } } public int? ErrorThreshold { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel? LoggingLevel { get { throw null; } set { } } public int? MaxConcurrencyPerInstance { get { throw null; } set { } } @@ -2029,11 +3860,13 @@ public MachineLearningCodeConfiguration(string scoringScript) { } public partial class MachineLearningCodeContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { public MachineLearningCodeContainerProperties() { } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } } public partial class MachineLearningCodeVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { public MachineLearningCodeVersionProperties() { } public System.Uri CodeUri { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } } public partial class MachineLearningCommandJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties { @@ -2045,8 +3878,10 @@ public MachineLearningCommandJob(string command, Azure.Core.ResourceIdentifier e public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJobLimits Limits { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState? MlflowAutologger { get { throw null; } set { } } public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } public System.BinaryData Parameters { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.JobQueueSettings QueueSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration Resources { get { throw null; } set { } } } public partial class MachineLearningCommandJobLimits : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobLimits @@ -2056,11 +3891,14 @@ public MachineLearningCommandJobLimits() { } public partial class MachineLearningComponentContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { public MachineLearningComponentContainerProperties() { } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } } public partial class MachineLearningComponentVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { public MachineLearningComponentVersionProperties() { } public System.BinaryData ComponentSpec { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } + public string Stage { get { throw null; } set { } } } public partial class MachineLearningComputeInstance : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { @@ -2182,11 +4020,15 @@ public MachineLearningComputeInstanceProperties() { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get { throw null; } } public System.Collections.Generic.IReadOnlyList Containers { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceCreatedBy CreatedBy { get { throw null; } } + public System.Collections.Generic.IList CustomServices { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList DataDisks { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataMounts { get { throw null; } } public bool? EnableNodePublicIP { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string IdleTimeBeforeShutdown { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceLastOperation LastOperation { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger? MlflowAutologger { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageMetadata OSImageMetadata { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAssignedUser PersonalComputeInstanceAssignedUser { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList SchedulesComputeStartStop { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningScriptsToExecute Scripts { get { throw null; } set { } } @@ -2296,15 +4138,19 @@ protected MachineLearningComputeSecrets() { } } public partial class MachineLearningComputeStartStopSchedule { - internal MachineLearningComputeStartStopSchedule() { } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction? Action { get { throw null; } } + public MachineLearningComputeStartStopSchedule() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction? Action { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.CronTrigger Cron { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.ComputeStartStopCronSchedule CronSchedule { get { throw null; } set { } } public string Id { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus? ProvisioningStatus { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceTrigger Recurrence { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase Schedule { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? Status { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType? TriggerType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.ComputeStartStopRecurrenceSchedule RecurrenceSchedule { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase Schedule { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? Status { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType? TriggerType { get { throw null; } set { } } } public partial class MachineLearningComputeSystemService { @@ -2319,9 +4165,22 @@ internal MachineLearningComputeSystemService() { } private readonly object _dummy; private readonly int _dummyPrimitive; public MachineLearningConnectionCategory(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory AdlsGen2 { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory ApiKey { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory AzureMySqlDB { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory AzureOpenAI { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory AzurePostgresDB { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory AzureSqlDB { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory AzureSynapseAnalytics { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory CognitiveSearch { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory CognitiveService { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory ContainerRegistry { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory CustomKeys { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory Git { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory PythonFeed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory Redis { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory S3 { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory Snowflake { get { throw null; } } public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -2359,6 +4218,7 @@ public MachineLearningContainerResourceSettings() { } private readonly int _dummyPrimitive; public MachineLearningContainerType(string value) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType InferenceServer { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType ModelDataCollector { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType StorageInitializer { get { throw null; } } public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -2379,6 +4239,9 @@ public MachineLearningCustomModelJobInput(System.Uri uri) { } public partial class MachineLearningCustomModelJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { public MachineLearningCustomModelJobOutput() { } + public string AssetName { get { throw null; } set { } } + public string AssetVersion { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting AutoDeleteSetting { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } @@ -2437,6 +4300,7 @@ public partial class MachineLearningDatastoreProperties : Azure.ResourceManager. { public MachineLearningDatastoreProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials) { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials Credentials { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.IntellectualProperty IntellectualProperty { get { throw null; } set { } } public bool? IsDefault { get { throw null; } } } public abstract partial class MachineLearningDatastoreSecrets @@ -2462,10 +4326,22 @@ protected MachineLearningDatastoreSecrets() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType right) { throw null; } public override string ToString() { throw null; } } + public partial class MachineLearningDataVersionCollectionGetAllOptions + { + public MachineLearningDataVersionCollectionGetAllOptions() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? ListViewType { get { throw null; } set { } } + public string OrderBy { get { throw null; } set { } } + public string Skip { get { throw null; } set { } } + public string Stage { get { throw null; } set { } } + public string Tags { get { throw null; } set { } } + public int? Top { get { throw null; } set { } } + } public partial class MachineLearningDataVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { public MachineLearningDataVersionProperties(System.Uri dataUri) { } public System.Uri DataUri { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.IntellectualProperty IntellectualProperty { get { throw null; } set { } } + public string Stage { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningDayOfWeek : System.IEquatable @@ -2601,16 +4477,23 @@ protected MachineLearningEarlyTerminationPolicy() { } } public partial class MachineLearningEncryptionKeyVaultProperties { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public MachineLearningEncryptionKeyVaultProperties(Azure.Core.ResourceIdentifier keyVaultArmId, string keyIdentifier) { } + public MachineLearningEncryptionKeyVaultProperties(string keyIdentifier, Azure.Core.ResourceIdentifier keyVaultArmId) { } public string IdentityClientId { get { throw null; } set { } } public string KeyIdentifier { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultArmId { get { throw null; } set { } } } public partial class MachineLearningEncryptionSetting { + public MachineLearningEncryptionSetting(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties keyVaultProperties, Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus status) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public MachineLearningEncryptionSetting(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus status, Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties keyVaultProperties) { } + public Azure.Core.ResourceIdentifier CosmosDBResourceId { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SearchAccountResourceId { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus Status { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageAccountResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -2738,6 +4621,7 @@ public MachineLearningEndpointScheduleAction(System.BinaryData endpointInvocatio public partial class MachineLearningEnvironmentContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { public MachineLearningEnvironmentContainerProperties() { } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningEnvironmentType : System.IEquatable @@ -2766,7 +4650,10 @@ public MachineLearningEnvironmentVersionProperties() { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType? EnvironmentType { get { throw null; } } public string Image { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerProperties InferenceConfig { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.IntellectualProperty IntellectualProperty { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType? OSType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } + public string Stage { get { throw null; } set { } } } public partial class MachineLearningError { @@ -2805,6 +4692,99 @@ internal MachineLearningEstimatedVmPrices() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag right) { throw null; } public override string ToString() { throw null; } } + public partial class MachineLearningFeatureProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase + { + public MachineLearningFeatureProperties() { } + public Azure.ResourceManager.MachineLearning.Models.FeatureDataType? DataType { get { throw null; } set { } } + public string FeatureName { get { throw null; } set { } } + } + public partial class MachineLearningFeatureSetContainerCollectionGetAllOptions + { + public MachineLearningFeatureSetContainerCollectionGetAllOptions() { } + public string CreatedBy { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? ListViewType { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public int? PageSize { get { throw null; } set { } } + public string Skip { get { throw null; } set { } } + public string Tags { get { throw null; } set { } } + } + public partial class MachineLearningFeatureSetContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer + { + public MachineLearningFeatureSetContainerProperties() { } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class MachineLearningFeatureSetJob + { + internal MachineLearningFeatureSetJob() { } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.TimeSpan? Duration { get { throw null; } } + public string ExperimentId { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.FeatureStoreJobType? FeatureStoreJobType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.FeatureWindow FeatureWindow { get { throw null; } } + public string JobId { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + public partial class MachineLearningFeatureSetVersionCollectionGetAllOptions + { + public MachineLearningFeatureSetVersionCollectionGetAllOptions() { } + public string CreatedBy { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? ListViewType { get { throw null; } set { } } + public int? PageSize { get { throw null; } set { } } + public string Skip { get { throw null; } set { } } + public string Stage { get { throw null; } set { } } + public string Tags { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + public string VersionName { get { throw null; } set { } } + } + public partial class MachineLearningFeatureSetVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase + { + public MachineLearningFeatureSetVersionProperties() { } + public System.Collections.Generic.IList Entities { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MaterializationSettings MaterializationSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } + public string SpecificationPath { get { throw null; } set { } } + public string Stage { get { throw null; } set { } } + } + public partial class MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions + { + public MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions() { } + public string CreatedBy { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? ListViewType { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public int? PageSize { get { throw null; } set { } } + public string Skip { get { throw null; } set { } } + public string Tags { get { throw null; } set { } } + } + public partial class MachineLearningFeatureStoreEntityContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer + { + public MachineLearningFeatureStoreEntityContainerProperties() { } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions + { + public MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions() { } + public string CreatedBy { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? ListViewType { get { throw null; } set { } } + public int? PageSize { get { throw null; } set { } } + public string Skip { get { throw null; } set { } } + public string Stage { get { throw null; } set { } } + public string Tags { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + public string VersionName { get { throw null; } set { } } + } + public partial class MachineLearningFeatureStoreEntityVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase + { + public MachineLearningFeatureStoreEntityVersionProperties() { } + public System.Collections.Generic.IList IndexColumns { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } + public string Stage { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningFeaturizationMode : System.IEquatable { @@ -2834,6 +4814,42 @@ public partial class MachineLearningFlavorData public MachineLearningFlavorData() { } public System.Collections.Generic.IDictionary Data { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningFlowAutoLogger : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningFlowAutoLogger(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningFlowAutoLoggerState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningFlowAutoLoggerState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLoggerState right) { throw null; } + public override string ToString() { throw null; } + } public partial class MachineLearningFlowModelJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput { public MachineLearningFlowModelJobInput(System.Uri uri) { } @@ -2843,6 +4859,9 @@ public MachineLearningFlowModelJobInput(System.Uri uri) { } public partial class MachineLearningFlowModelJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { public MachineLearningFlowModelJobOutput() { } + public string AssetName { get { throw null; } set { } } + public string AssetVersion { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting AutoDeleteSetting { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } @@ -2851,10 +4870,13 @@ public partial class MachineLearningForecasting : Azure.ResourceManager.MachineL public MachineLearningForecasting(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableFixedParameters FixedParameters { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ForecastingSettings ForecastingSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableSweepSettings SweepSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput TestData { get { throw null; } set { } } public double? TestDataSize { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ForecastingTrainingSettings TrainingSettings { get { throw null; } set { } } @@ -2970,6 +4992,17 @@ public MachineLearningInstanceTypeSchemaResources() { } public System.Collections.Generic.IDictionary Limits { get { throw null; } } public System.Collections.Generic.IDictionary Requests { get { throw null; } } } + public partial class MachineLearningJobCollectionGetAllOptions + { + public MachineLearningJobCollectionGetAllOptions() { } + public string AssetName { get { throw null; } set { } } + public string JobType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? ListViewType { get { throw null; } set { } } + public bool? Scheduled { get { throw null; } set { } } + public string ScheduleId { get { throw null; } set { } } + public string Skip { get { throw null; } set { } } + public string Tag { get { throw null; } set { } } + } public abstract partial class MachineLearningJobInput { protected MachineLearningJobInput() { } @@ -2985,6 +5018,11 @@ public abstract partial class MachineLearningJobOutput protected MachineLearningJobOutput() { } public string Description { get { throw null; } set { } } } + public partial class MachineLearningJobPatch + { + public MachineLearningJobPatch() { } + public System.Collections.Generic.IDictionary NotificationSettingWebhooks { get { throw null; } set { } } + } public partial class MachineLearningJobProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase { public MachineLearningJobProperties() { } @@ -2994,6 +5032,8 @@ public MachineLearningJobProperties() { } public string ExperimentName { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration Identity { get { throw null; } set { } } public bool? IsArchived { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NotificationSetting NotificationSetting { get { throw null; } set { } } + public System.Collections.Generic.IDictionary SecretsConfiguration { get { throw null; } set { } } public System.Collections.Generic.IDictionary Services { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? Status { get { throw null; } } } @@ -3014,6 +5054,7 @@ public MachineLearningJobService() { } public string Endpoint { get { throw null; } set { } } public string ErrorMessage { get { throw null; } } public string JobServiceType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.JobNodes Nodes { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } public string Status { get { throw null; } } @@ -3036,6 +5077,7 @@ public MachineLearningJobService() { } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Provisioning { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Queued { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Running { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Scheduled { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Starting { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Unknown { get { throw null; } } public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus other) { throw null; } @@ -3171,6 +5213,7 @@ public MachineLearningManagedOnlineDeployment() { } public partial class MachineLearningModelContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { public MachineLearningModelContainerProperties() { } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningModelSize : System.IEquatable @@ -3203,6 +5246,7 @@ public MachineLearningModelVersionCollectionGetAllOptions() { } public string OrderBy { get { throw null; } set { } } public string Properties { get { throw null; } set { } } public string Skip { get { throw null; } set { } } + public string Stage { get { throw null; } set { } } public string Tags { get { throw null; } set { } } public int? Top { get { throw null; } set { } } public string Version { get { throw null; } set { } } @@ -3211,9 +5255,12 @@ public partial class MachineLearningModelVersionProperties : Azure.ResourceManag { public MachineLearningModelVersionProperties() { } public System.Collections.Generic.IDictionary Flavors { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.IntellectualProperty IntellectualProperty { get { throw null; } set { } } public string JobName { get { throw null; } set { } } public string ModelType { get { throw null; } set { } } public System.Uri ModelUri { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? ProvisioningState { get { throw null; } } + public string Stage { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningMountAction : System.IEquatable @@ -3323,6 +5370,7 @@ public partial class MachineLearningNotebookResourceInfo { internal MachineLearningNotebookResourceInfo() { } public string Fqdn { get { throw null; } } + public bool? IsPrivateLinkEnabled { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError NotebookPreparationError { get { throw null; } } public string ResourceId { get { throw null; } } } @@ -3341,6 +5389,7 @@ public partial class MachineLearningOnlineDeploymentProperties : Azure.ResourceM { public MachineLearningOnlineDeploymentProperties() { } public bool? AppInsightsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.DataCollector DataCollector { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? EgressPublicNetworkAccess { get { throw null; } set { } } public string InstanceType { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings LivenessProbe { get { throw null; } set { } } @@ -3366,6 +5415,7 @@ public partial class MachineLearningOnlineEndpointProperties : Azure.ResourceMan { public MachineLearningOnlineEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode)) { } public string Compute { get { throw null; } set { } } + public System.Collections.Generic.IDictionary MirrorTraffic { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? PublicNetworkAccess { get { throw null; } set { } } public System.Collections.Generic.IDictionary Traffic { get { throw null; } set { } } @@ -3502,12 +5552,19 @@ protected MachineLearningOnlineScaleSettings() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class MachineLearningOutboundRule + { + protected MachineLearningOutboundRule() { } + public Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory? Category { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus? Status { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningOutputDeliveryMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public MachineLearningOutputDeliveryMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode Direct { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode ReadWriteMount { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode Upload { get { throw null; } } public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode other) { throw null; } @@ -3750,11 +5807,30 @@ public MachineLearningRecurrenceTrigger(Azure.ResourceManager.MachineLearning.Mo public int Interval { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceSchedule Schedule { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MachineLearningRemoteLoginPortPublicAccess : System.IEquatable + public partial class MachineLearningRegistryModelVersionCollectionGetAllOptions { - private readonly object _dummy; - private readonly int _dummyPrimitive; + public MachineLearningRegistryModelVersionCollectionGetAllOptions() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? ListViewType { get { throw null; } set { } } + public string OrderBy { get { throw null; } set { } } + public string Properties { get { throw null; } set { } } + public string Skip { get { throw null; } set { } } + public string Tags { get { throw null; } set { } } + public int? Top { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + public partial class MachineLearningRegistryPatch + { + public MachineLearningRegistryPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuPatch Sku { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningRemoteLoginPortPublicAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; public MachineLearningRemoteLoginPortPublicAccess(string value) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess Disabled { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess Enabled { get { throw null; } } @@ -3781,6 +5857,8 @@ public partial class MachineLearningResourceConfiguration public MachineLearningResourceConfiguration() { } public int? InstanceCount { get { throw null; } set { } } public string InstanceType { get { throw null; } set { } } + public System.Collections.Generic.IList Locations { get { throw null; } set { } } + public int? MaxInstanceCount { get { throw null; } set { } } public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } } public partial class MachineLearningResourceName @@ -3830,10 +5908,10 @@ protected MachineLearningScheduleAction() { } } public partial class MachineLearningScheduleBase { - internal MachineLearningScheduleBase() { } - public string Id { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState? ProvisioningStatus { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? Status { get { throw null; } } + public MachineLearningScheduleBase() { } + public string Id { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState? ProvisioningStatus { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? Status { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningScheduleListViewType : System.IEquatable @@ -4186,6 +6264,7 @@ public MachineLearningSweepJob(Azure.ResourceManager.MachineLearning.Models.Mach public Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJobLimits Limits { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective Objective { get { throw null; } set { } } public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.JobQueueSettings QueueSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm SamplingAlgorithm { get { throw null; } set { } } public System.BinaryData SearchSpace { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningTrialComponent Trial { get { throw null; } set { } } @@ -4230,6 +6309,9 @@ public MachineLearningTableJobInput(System.Uri uri) { } public partial class MachineLearningTableJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { public MachineLearningTableJobOutput() { } + public string AssetName { get { throw null; } set { } } + public string AssetVersion { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting AutoDeleteSetting { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } @@ -4251,6 +6333,7 @@ public MachineLearningTrainingSettings() { } public bool? IsStackEnsembleEnabled { get { throw null; } set { } } public bool? IsVoteEnsembleEnabled { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningStackEnsembleSettings StackEnsembleSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TrainingMode? TrainingMode { get { throw null; } set { } } } public partial class MachineLearningTrialComponent { @@ -4296,6 +6379,9 @@ public MachineLearningTritonModelJobInput(System.Uri uri) { } public partial class MachineLearningTritonModelJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { public MachineLearningTritonModelJobOutput() { } + public string AssetName { get { throw null; } set { } } + public string AssetVersion { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting AutoDeleteSetting { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } @@ -4347,6 +6433,9 @@ public MachineLearningUriFileJobInput(System.Uri uri) { } public partial class MachineLearningUriFileJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { public MachineLearningUriFileJobOutput() { } + public string AssetName { get { throw null; } set { } } + public string AssetVersion { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting AutoDeleteSetting { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } @@ -4363,6 +6452,9 @@ public MachineLearningUriFolderJobInput(System.Uri uri) { } public partial class MachineLearningUriFolderJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { public MachineLearningUriFolderJobOutput() { } + public string AssetName { get { throw null; } set { } } + public string AssetVersion { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoDeleteSetting AutoDeleteSetting { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } @@ -4442,6 +6534,7 @@ public MachineLearningUsernamePasswordAuthTypeWorkspaceConnection() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl right) { throw null; } public override string ToString() { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningValueFormat : System.IEquatable { @@ -4557,18 +6650,32 @@ public MachineLearningVmSshCredentials() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier left, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class MachineLearningWebhook + { + protected MachineLearningWebhook() { } + public string EventType { get { throw null; } set { } } + } public partial class MachineLearningWorkspaceConnectionManagedIdentity { public MachineLearningWorkspaceConnectionManagedIdentity() { } public string ClientId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } } + public partial class MachineLearningWorkspaceConnectionPatch + { + public MachineLearningWorkspaceConnectionPatch() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties Properties { get { throw null; } set { } } + } public abstract partial class MachineLearningWorkspaceConnectionProperties { protected MachineLearningWorkspaceConnectionProperties() { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? Category { get { throw null; } set { } } + public System.DateTimeOffset? ExpiryOn { get { throw null; } set { } } + public System.BinaryData Metadata { get { throw null; } set { } } public string Target { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Value { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? ValueFormat { get { throw null; } set { } } } public partial class MachineLearningWorkspaceConnectionUsernamePassword @@ -4639,13 +6746,21 @@ public MachineLearningWorkspacePatch() { } public string ContainerRegistry { get { throw null; } set { } } public int? CosmosDbCollectionsThroughput { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public bool? EnableDataIsolation { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.FeatureStoreSettings FeatureStoreSettings { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string ImageBuildCompute { get { throw null; } set { } } + public string KeyIdentifier { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings ManagedNetwork { get { throw null; } set { } } public string PrimaryUserAssignedIdentity { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + public int? SoftDeleteRetentionInDays { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public bool? V1LegacyMode { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningWorkspaceQuotaStatus : System.IEquatable @@ -4680,10 +6795,281 @@ internal MachineLearningWorkspaceQuotaUpdate() { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? Unit { get { throw null; } } public string UpdateWorkspaceQuotasType { get { throw null; } } } + public partial class ManagedComputeIdentity : Azure.ResourceManager.MachineLearning.Models.MonitorComputeIdentityBase + { + public ManagedComputeIdentity() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + } + public partial class ManagedNetworkProvisionContent + { + public ManagedNetworkProvisionContent() { } + public bool? IncludeSpark { get { throw null; } set { } } + } + public partial class ManagedNetworkProvisionStatus + { + public ManagedNetworkProvisionStatus() { } + public bool? SparkReady { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus? Status { get { throw null; } set { } } + } + public partial class ManagedNetworkSettings + { + public ManagedNetworkSettings() { } + public Azure.ResourceManager.MachineLearning.Models.IsolationMode? IsolationMode { get { throw null; } set { } } + public string NetworkId { get { throw null; } } + public System.Collections.Generic.IDictionary OutboundRules { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ManagedNetworkProvisionStatus Status { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedNetworkStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedNetworkStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus Active { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus left, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus left, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MaterializationSettings + { + public MaterializationSettings() { } + public Azure.ResourceManager.MachineLearning.Models.NotificationSetting Notification { get { throw null; } set { } } + public string ResourceInstanceType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceTrigger Schedule { get { throw null; } set { } } + public System.Collections.Generic.IDictionary SparkConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType? StoreType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MaterializationStoreType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MaterializationStoreType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType Offline { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType Online { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType OnlineAndOffline { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType left, Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType left, Azure.ResourceManager.MachineLearning.Models.MaterializationStoreType right) { throw null; } + public override string ToString() { throw null; } + } public partial class MedianStoppingPolicy : Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy { public MedianStoppingPolicy() { } } + public partial class MLAssistConfigurationDisabled : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssistConfiguration + { + public MLAssistConfigurationDisabled() { } + } + public partial class ModelConfiguration + { + public ModelConfiguration() { } + public Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode? Mode { get { throw null; } set { } } + public string MountPath { get { throw null; } set { } } + } + public partial class ModelPackageContent + { + public ModelPackageContent(Azure.ResourceManager.MachineLearning.Models.InferencingServer inferencingServer, string targetEnvironmentId) { } + public Azure.ResourceManager.MachineLearning.Models.BaseEnvironmentSource BaseEnvironmentSource { get { throw null; } set { } } + public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.InferencingServer InferencingServer { get { throw null; } } + public System.Collections.Generic.IList Inputs { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ModelConfiguration ModelConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } } + public string TargetEnvironmentId { get { throw null; } } + } + public partial class ModelPackageInput + { + public ModelPackageInput(Azure.ResourceManager.MachineLearning.Models.PackageInputType inputType, Azure.ResourceManager.MachineLearning.Models.PackageInputPathBase path) { } + public Azure.ResourceManager.MachineLearning.Models.PackageInputType InputType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode? Mode { get { throw null; } set { } } + public string MountPath { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.PackageInputPathBase Path { get { throw null; } set { } } + } + public partial class ModelPackageResult + { + internal ModelPackageResult() { } + public Azure.ResourceManager.MachineLearning.Models.BaseEnvironmentSource BaseEnvironmentSource { get { throw null; } } + public string BuildId { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.PackageBuildState? BuildState { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary EnvironmentVariables { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.InferencingServer InferencingServer { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Inputs { get { throw null; } } + public System.Uri LogUri { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.ModelConfiguration ModelConfiguration { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + public string TargetEnvironmentId { get { throw null; } } + } + public abstract partial class ModelPerformanceMetricThresholdBase + { + protected ModelPerformanceMetricThresholdBase() { } + public double? ThresholdValue { get { throw null; } set { } } + } + public partial class ModelPerformanceSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public ModelPerformanceSignal(Azure.ResourceManager.MachineLearning.Models.ModelPerformanceMetricThresholdBase metricThreshold, System.Collections.Generic.IEnumerable productionData, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase referenceData) { } + public Azure.ResourceManager.MachineLearning.Models.MonitoringDataSegment DataSegment { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ModelPerformanceMetricThresholdBase MetricThreshold { get { throw null; } set { } } + public System.Collections.Generic.IList ProductionData { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ReferenceData { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ModelTaskType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ModelTaskType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ModelTaskType Classification { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ModelTaskType QuestionAnswering { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ModelTaskType Regression { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ModelTaskType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.ModelTaskType left, Azure.ResourceManager.MachineLearning.Models.ModelTaskType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ModelTaskType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ModelTaskType left, Azure.ResourceManager.MachineLearning.Models.ModelTaskType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class MonitorComputeConfigurationBase + { + protected MonitorComputeConfigurationBase() { } + } + public abstract partial class MonitorComputeIdentityBase + { + protected MonitorComputeIdentityBase() { } + } + public partial class MonitorDefinition + { + public MonitorDefinition(Azure.ResourceManager.MachineLearning.Models.MonitorComputeConfigurationBase computeConfiguration, System.Collections.Generic.IDictionary signals) { } + public Azure.ResourceManager.MachineLearning.Models.MonitoringAlertNotificationSettingsBase AlertNotificationSetting { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitorComputeConfigurationBase ComputeConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringTarget MonitoringTarget { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Signals { get { throw null; } } + } + public abstract partial class MonitoringAlertNotificationSettingsBase + { + protected MonitoringAlertNotificationSettingsBase() { } + } + public partial class MonitoringDataSegment + { + public MonitoringDataSegment() { } + public string Feature { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MonitoringFeatureDataType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MonitoringFeatureDataType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType Categorical { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType Numerical { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType left, Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType left, Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureDataType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class MonitoringFeatureFilterBase + { + protected MonitoringFeatureFilterBase() { } + } + public abstract partial class MonitoringInputDataBase + { + protected MonitoringInputDataBase(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri) { } + public System.Collections.Generic.IDictionary Columns { get { throw null; } set { } } + public string DataContext { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.JobInputType JobInputType { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MonitoringModelType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MonitoringModelType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MonitoringModelType Classification { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MonitoringModelType Regression { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MonitoringModelType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MonitoringModelType left, Azure.ResourceManager.MachineLearning.Models.MonitoringModelType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MonitoringModelType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MonitoringModelType left, Azure.ResourceManager.MachineLearning.Models.MonitoringModelType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MonitoringNotificationMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MonitoringNotificationMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode left, Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode left, Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class MonitoringSignalBase + { + protected MonitoringSignalBase() { } + public Azure.ResourceManager.MachineLearning.Models.MonitoringNotificationMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } + } + public partial class MonitoringTarget + { + public MonitoringTarget(Azure.ResourceManager.MachineLearning.Models.ModelTaskType taskType) { } + public string DeploymentId { get { throw null; } set { } } + public string ModelId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ModelTaskType TaskType { get { throw null; } set { } } + } + public partial class MonitoringWorkspaceConnection + { + public MonitoringWorkspaceConnection() { } + public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Secrets { get { throw null; } set { } } + } + public partial class MonitorServerlessSparkCompute : Azure.ResourceManager.MachineLearning.Models.MonitorComputeConfigurationBase + { + public MonitorServerlessSparkCompute(Azure.ResourceManager.MachineLearning.Models.MonitorComputeIdentityBase computeIdentity, string instanceType, string runtimeVersion) { } + public Azure.ResourceManager.MachineLearning.Models.MonitorComputeIdentityBase ComputeIdentity { get { throw null; } set { } } + public string InstanceType { get { throw null; } set { } } + public string RuntimeVersion { get { throw null; } set { } } + } + public partial class MountBindOptions + { + public MountBindOptions() { } + public bool? DoesCreateHostPath { get { throw null; } set { } } + public string Propagation { get { throw null; } set { } } + public string Selinux { get { throw null; } set { } } + } public partial class MpiDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration { public MpiDistributionConfiguration() { } @@ -4693,12 +7079,168 @@ public abstract partial class NCrossValidations { protected NCrossValidations() { } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkingRuleAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkingRuleAction(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction Allow { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction left, Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction left, Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NlpFixedParameters + { + public NlpFixedParameters() { } + public int? GradientAccumulationSteps { get { throw null; } set { } } + public float? LearningRate { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler? LearningRateScheduler { get { throw null; } set { } } + public string ModelName { get { throw null; } set { } } + public int? NumberOfEpochs { get { throw null; } set { } } + public int? TrainingBatchSize { get { throw null; } set { } } + public int? ValidationBatchSize { get { throw null; } set { } } + public float? WarmupRatio { get { throw null; } set { } } + public float? WeightDecay { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NlpLearningRateScheduler : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NlpLearningRateScheduler(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler Constant { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler ConstantWithWarmup { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler Cosine { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler CosineWithRestarts { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler Linear { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler Polynomial { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler left, Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler left, Azure.ResourceManager.MachineLearning.Models.NlpLearningRateScheduler right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NlpParameterSubspace + { + public NlpParameterSubspace() { } + public string GradientAccumulationSteps { get { throw null; } set { } } + public string LearningRate { get { throw null; } set { } } + public string LearningRateScheduler { get { throw null; } set { } } + public string ModelName { get { throw null; } set { } } + public string NumberOfEpochs { get { throw null; } set { } } + public string TrainingBatchSize { get { throw null; } set { } } + public string ValidationBatchSize { get { throw null; } set { } } + public string WarmupRatio { get { throw null; } set { } } + public string WeightDecay { get { throw null; } set { } } + } + public partial class NlpSweepSettings + { + public NlpSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType samplingAlgorithm) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy EarlyTermination { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType SamplingAlgorithm { get { throw null; } set { } } + } public partial class NlpVerticalLimitSettings { public NlpVerticalLimitSettings() { } public int? MaxConcurrentTrials { get { throw null; } set { } } + public int? MaxNodes { get { throw null; } set { } } public int? MaxTrials { get { throw null; } set { } } public System.TimeSpan? Timeout { get { throw null; } set { } } + public System.TimeSpan? TrialTimeout { get { throw null; } set { } } + } + public partial class NotificationSetting + { + public NotificationSetting() { } + public System.Collections.Generic.IList EmailOn { get { throw null; } set { } } + public System.Collections.Generic.IList Emails { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Webhooks { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NumericalDataDriftMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NumericalDataDriftMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric JensenShannonDistance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric NormalizedWassersteinDistance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric PopulationStabilityIndex { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric TwoSampleKolmogorovSmirnovTest { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric left, Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric left, Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NumericalDataDriftMetricThreshold : Azure.ResourceManager.MachineLearning.Models.DataDriftMetricThresholdBase + { + public NumericalDataDriftMetricThreshold(Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.NumericalDataDriftMetric Metric { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NumericalDataQualityMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NumericalDataQualityMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric DataTypeErrorRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric NullValueRate { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric OutOfBoundsRate { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric left, Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric left, Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NumericalDataQualityMetricThreshold : Azure.ResourceManager.MachineLearning.Models.DataQualityMetricThresholdBase + { + public NumericalDataQualityMetricThreshold(Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.NumericalDataQualityMetric Metric { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NumericalPredictionDriftMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NumericalPredictionDriftMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric JensenShannonDistance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric NormalizedWassersteinDistance { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric PopulationStabilityIndex { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric TwoSampleKolmogorovSmirnovTest { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric left, Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric left, Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NumericalPredictionDriftMetricThreshold : Azure.ResourceManager.MachineLearning.Models.PredictionDriftMetricThresholdBase + { + public NumericalPredictionDriftMetricThreshold(Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.NumericalPredictionDriftMetric Metric { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ObjectDetectionPrimaryMetric : System.IEquatable @@ -4717,6 +7259,215 @@ public NlpVerticalLimitSettings() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class OneLakeArtifact + { + protected OneLakeArtifact(string artifactName) { } + public string ArtifactName { get { throw null; } set { } } + } + public partial class OneLakeDatastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties + { + public OneLakeDatastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, Azure.ResourceManager.MachineLearning.Models.OneLakeArtifact artifact, string oneLakeWorkspaceName) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } + public Azure.ResourceManager.MachineLearning.Models.OneLakeArtifact Artifact { get { throw null; } set { } } + public string Endpoint { get { throw null; } set { } } + public string OneLakeWorkspaceName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + } + public partial class OnlineInferenceConfiguration + { + public OnlineInferenceConfiguration() { } + public System.Collections.Generic.IDictionary Configurations { get { throw null; } set { } } + public string EntryScript { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerRoute LivenessRoute { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerRoute ReadinessRoute { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerRoute ScoringRoute { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OutboundRuleCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OutboundRuleCategory(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory Recommended { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory Required { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory UserDefined { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory left, Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory left, Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OutboundRuleStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OutboundRuleStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus Active { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus Inactive { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus left, Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus left, Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PackageBuildState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PackageBuildState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.PackageBuildState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.PackageBuildState NotStarted { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.PackageBuildState Running { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.PackageBuildState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.PackageBuildState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.PackageBuildState left, Azure.ResourceManager.MachineLearning.Models.PackageBuildState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.PackageBuildState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.PackageBuildState left, Azure.ResourceManager.MachineLearning.Models.PackageBuildState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PackageInputDeliveryMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PackageInputDeliveryMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode Copy { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode Download { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.PackageInputDeliveryMode right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class PackageInputPathBase + { + protected PackageInputPathBase() { } + } + public partial class PackageInputPathId : Azure.ResourceManager.MachineLearning.Models.PackageInputPathBase + { + public PackageInputPathId() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + } + public partial class PackageInputPathUri : Azure.ResourceManager.MachineLearning.Models.PackageInputPathBase + { + public PackageInputPathUri() { } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class PackageInputPathVersion : Azure.ResourceManager.MachineLearning.Models.PackageInputPathBase + { + public PackageInputPathVersion() { } + public string ResourceName { get { throw null; } set { } } + public string ResourceVersion { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PackageInputType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PackageInputType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.PackageInputType UriFile { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.PackageInputType UriFolder { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.PackageInputType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.PackageInputType left, Azure.ResourceManager.MachineLearning.Models.PackageInputType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.PackageInputType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.PackageInputType left, Azure.ResourceManager.MachineLearning.Models.PackageInputType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class PendingUploadCredentialDto + { + protected PendingUploadCredentialDto() { } + } + public partial class PendingUploadRequestDto + { + public PendingUploadRequestDto() { } + public string PendingUploadId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.PendingUploadType? PendingUploadType { get { throw null; } set { } } + } + public partial class PendingUploadResponseDto + { + internal PendingUploadResponseDto() { } + public Azure.ResourceManager.MachineLearning.Models.BlobReferenceForConsumptionDto BlobReferenceForConsumption { get { throw null; } } + public string PendingUploadId { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.PendingUploadType? PendingUploadType { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PendingUploadType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PendingUploadType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.PendingUploadType None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.PendingUploadType TemporaryBlobReference { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.PendingUploadType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.PendingUploadType left, Azure.ResourceManager.MachineLearning.Models.PendingUploadType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.PendingUploadType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.PendingUploadType left, Azure.ResourceManager.MachineLearning.Models.PendingUploadType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class PredictionDriftMetricThresholdBase + { + protected PredictionDriftMetricThresholdBase() { } + public double? ThresholdValue { get { throw null; } set { } } + } + public partial class PredictionDriftMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase + { + public PredictionDriftMonitoringSignal(System.Collections.Generic.IEnumerable metricThresholds, Azure.ResourceManager.MachineLearning.Models.MonitoringModelType modelType, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase productionData, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase referenceData) { } + public System.Collections.Generic.IList MetricThresholds { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringModelType ModelType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ProductionData { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase ReferenceData { get { throw null; } set { } } + } + public partial class PrivateEndpointBase + { + public PrivateEndpointBase() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + } + public partial class PrivateEndpointDestination + { + public PrivateEndpointDestination() { } + public string ServiceResourceId { get { throw null; } set { } } + public bool? SparkEnabled { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus? SparkStatus { get { throw null; } set { } } + public string SubresourceTarget { get { throw null; } set { } } + } + public partial class PrivateEndpointOutboundRule : Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule + { + public PrivateEndpointOutboundRule() { } + public Azure.ResourceManager.MachineLearning.Models.PrivateEndpointDestination Destination { get { throw null; } set { } } + } + public partial class ProgressMetrics + { + internal ProgressMetrics() { } + public long? CompletedDatapointCount { get { throw null; } } + public System.DateTimeOffset? IncrementalDataLastRefreshOn { get { throw null; } } + public long? SkippedDatapointCount { get { throw null; } } + public long? TotalDatapointCount { get { throw null; } } + } public partial class PyTorchDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration { public PyTorchDistributionConfiguration() { } @@ -4725,6 +7476,7 @@ public PyTorchDistributionConfiguration() { } public partial class RandomSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm { public RandomSamplingAlgorithm() { } + public string Logbase { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule? Rule { get { throw null; } set { } } public int? Seed { get { throw null; } set { } } } @@ -4746,12 +7498,124 @@ public RandomSamplingAlgorithm() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule left, Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule right) { throw null; } public override string ToString() { throw null; } } + public partial class RayDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration + { + public RayDistributionConfiguration() { } + public string Address { get { throw null; } set { } } + public int? DashboardPort { get { throw null; } set { } } + public string HeadNodeAdditionalArgs { get { throw null; } set { } } + public bool? IncludeDashboard { get { throw null; } set { } } + public int? Port { get { throw null; } set { } } + public string WorkerNodeAdditionalArgs { get { throw null; } set { } } + } + public partial class RegistryAcrDetails + { + public RegistryAcrDetails() { } + public Azure.Core.ResourceIdentifier ArmResourceId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SystemCreatedAcrAccount SystemCreatedAcrAccount { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RegistryAssetProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RegistryAssetProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState left, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState left, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RegistryPrivateEndpoint : Azure.ResourceManager.MachineLearning.Models.PrivateEndpointBase + { + public RegistryPrivateEndpoint() { } + public Azure.Core.ResourceIdentifier SubnetArmId { get { throw null; } set { } } + } + public partial class RegistryPrivateEndpointConnection + { + public RegistryPrivateEndpointConnection() { } + public System.Collections.Generic.IList GroupIds { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryPrivateEndpoint PrivateEndpoint { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegistryPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } set { } } + } + public partial class RegistryPrivateLinkServiceConnectionState + { + public RegistryPrivateLinkServiceConnectionState() { } + public string ActionsRequired { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + } + public partial class RegistryRegionArmDetails + { + public RegistryRegionArmDetails() { } + public System.Collections.Generic.IList AcrDetails { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public System.Collections.Generic.IList StorageAccountDetails { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RegressionModelPerformanceMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RegressionModelPerformanceMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric MeanAbsoluteError { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric MeanSquaredError { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric RootMeanSquaredError { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric left, Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric left, Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RegressionModelPerformanceMetricThreshold : Azure.ResourceManager.MachineLearning.Models.ModelPerformanceMetricThresholdBase + { + public RegressionModelPerformanceMetricThreshold(Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric metric) { } + public Azure.ResourceManager.MachineLearning.Models.RegressionModelPerformanceMetric Metric { get { throw null; } set { } } + } public partial class RegressionTrainingSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningTrainingSettings { public RegressionTrainingSettings() { } public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RollingRateType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RollingRateType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.RollingRateType Day { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RollingRateType Hour { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RollingRateType Minute { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RollingRateType Month { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RollingRateType Year { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.RollingRateType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.RollingRateType left, Azure.ResourceManager.MachineLearning.Models.RollingRateType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.RollingRateType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RollingRateType left, Azure.ResourceManager.MachineLearning.Models.RollingRateType right) { throw null; } + public override string ToString() { throw null; } + } public abstract partial class SamplingAlgorithm { protected SamplingAlgorithm() { } @@ -4775,6 +7639,80 @@ protected SamplingAlgorithm() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType left, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType right) { throw null; } public override string ToString() { throw null; } } + public partial class SasCredentialDto : Azure.ResourceManager.MachineLearning.Models.PendingUploadCredentialDto + { + internal SasCredentialDto() { } + public System.Uri SasUri { get { throw null; } } + } + public partial class SecretConfiguration + { + public SecretConfiguration() { } + public System.Uri Uri { get { throw null; } set { } } + public string WorkspaceSecretName { get { throw null; } set { } } + } + public partial class ServicePrincipalAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties + { + public ServicePrincipalAuthTypeWorkspaceConnectionProperties() { } + public Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionServicePrincipal Credentials { get { throw null; } set { } } + } + public partial class ServiceTagDestination + { + public ServiceTagDestination() { } + public Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction? Action { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList AddressPrefixes { get { throw null; } } + public string PortRanges { get { throw null; } set { } } + public string Protocol { get { throw null; } set { } } + public string ServiceTag { get { throw null; } set { } } + } + public partial class ServiceTagOutboundRule : Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule + { + public ServiceTagOutboundRule() { } + public Azure.ResourceManager.MachineLearning.Models.ServiceTagDestination Destination { get { throw null; } set { } } + } + public partial class SparkJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties + { + public SparkJob(string codeId, Azure.ResourceManager.MachineLearning.Models.SparkJobEntry entry) { } + public System.Collections.Generic.IList Archives { get { throw null; } set { } } + public string Args { get { throw null; } set { } } + public string CodeId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Conf { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SparkJobEntry Entry { get { throw null; } set { } } + public string EnvironmentId { get { throw null; } set { } } + public System.Collections.Generic.IList Files { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } + public System.Collections.Generic.IList Jars { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } + public System.Collections.Generic.IList PyFiles { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.JobQueueSettings QueueSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SparkResourceConfiguration Resources { get { throw null; } set { } } + } + public abstract partial class SparkJobEntry + { + protected SparkJobEntry() { } + } + public partial class SparkJobPythonEntry : Azure.ResourceManager.MachineLearning.Models.SparkJobEntry + { + public SparkJobPythonEntry(string file) { } + public string File { get { throw null; } set { } } + } + public partial class SparkJobScalaEntry : Azure.ResourceManager.MachineLearning.Models.SparkJobEntry + { + public SparkJobScalaEntry(string className) { } + public string ClassName { get { throw null; } set { } } + } + public partial class SparkResourceConfiguration + { + public SparkResourceConfiguration() { } + public string InstanceType { get { throw null; } set { } } + public string RuntimeVersion { get { throw null; } set { } } + } + public partial class StaticInputData : Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase + { + public StaticInputData(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri, System.DateTimeOffset windowEnd, System.DateTimeOffset windowStart) : base (default(Azure.ResourceManager.MachineLearning.Models.JobInputType), default(System.Uri)) { } + public string PreprocessingComponentId { get { throw null; } set { } } + public System.DateTimeOffset WindowEnd { get { throw null; } set { } } + public System.DateTimeOffset WindowStart { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct StochasticOptimizer : System.IEquatable { @@ -4795,6 +7733,82 @@ protected SamplingAlgorithm() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer left, Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer right) { throw null; } public override string ToString() { throw null; } } + public partial class StorageAccountDetails + { + public StorageAccountDetails() { } + public Azure.Core.ResourceIdentifier ArmResourceId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SystemCreatedStorageAccount SystemCreatedStorageAccount { get { throw null; } set { } } + } + public partial class SystemCreatedAcrAccount + { + public SystemCreatedAcrAccount() { } + public string AcrAccountName { get { throw null; } set { } } + public string AcrAccountSku { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ArmResourceId { get { throw null; } set { } } + } + public partial class SystemCreatedStorageAccount + { + public SystemCreatedStorageAccount() { } + public bool? AllowBlobPublicAccess { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ArmResourceId { get { throw null; } set { } } + public bool? StorageAccountHnsEnabled { get { throw null; } set { } } + public string StorageAccountName { get { throw null; } set { } } + public string StorageAccountType { get { throw null; } set { } } + } + public partial class TableFixedParameters + { + public TableFixedParameters() { } + public string Booster { get { throw null; } set { } } + public string BoostingType { get { throw null; } set { } } + public string GrowPolicy { get { throw null; } set { } } + public double? LearningRate { get { throw null; } set { } } + public int? MaxBin { get { throw null; } set { } } + public int? MaxDepth { get { throw null; } set { } } + public int? MaxLeaves { get { throw null; } set { } } + public int? MinDataInLeaf { get { throw null; } set { } } + public double? MinSplitGain { get { throw null; } set { } } + public string ModelName { get { throw null; } set { } } + public int? NEstimators { get { throw null; } set { } } + public int? NumLeaves { get { throw null; } set { } } + public string PreprocessorName { get { throw null; } set { } } + public double? RegAlpha { get { throw null; } set { } } + public double? RegLambda { get { throw null; } set { } } + public double? Subsample { get { throw null; } set { } } + public double? SubsampleFreq { get { throw null; } set { } } + public string TreeMethod { get { throw null; } set { } } + public bool? WithMean { get { throw null; } set { } } + public bool? WithStd { get { throw null; } set { } } + } + public partial class TableParameterSubspace + { + public TableParameterSubspace() { } + public string Booster { get { throw null; } set { } } + public string BoostingType { get { throw null; } set { } } + public string GrowPolicy { get { throw null; } set { } } + public string LearningRate { get { throw null; } set { } } + public string MaxBin { get { throw null; } set { } } + public string MaxDepth { get { throw null; } set { } } + public string MaxLeaves { get { throw null; } set { } } + public string MinDataInLeaf { get { throw null; } set { } } + public string MinSplitGain { get { throw null; } set { } } + public string ModelName { get { throw null; } set { } } + public string NEstimators { get { throw null; } set { } } + public string NumLeaves { get { throw null; } set { } } + public string PreprocessorName { get { throw null; } set { } } + public string RegAlpha { get { throw null; } set { } } + public string RegLambda { get { throw null; } set { } } + public string Subsample { get { throw null; } set { } } + public string SubsampleFreq { get { throw null; } set { } } + public string TreeMethod { get { throw null; } set { } } + public string WithMean { get { throw null; } set { } } + public string WithStd { get { throw null; } set { } } + } + public partial class TableSweepSettings + { + public TableSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType samplingAlgorithm) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy EarlyTermination { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType SamplingAlgorithm { get { throw null; } set { } } + } public partial class TableVerticalFeaturizationSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationSettings { public TableVerticalFeaturizationSettings() { } @@ -4811,7 +7825,10 @@ public TableVerticalLimitSettings() { } public double? ExitScore { get { throw null; } set { } } public int? MaxConcurrentTrials { get { throw null; } set { } } public int? MaxCoresPerTrial { get { throw null; } set { } } + public int? MaxNodes { get { throw null; } set { } } public int? MaxTrials { get { throw null; } set { } } + public int? SweepConcurrentTrials { get { throw null; } set { } } + public int? SweepTrials { get { throw null; } set { } } public System.TimeSpan? Timeout { get { throw null; } set { } } public System.TimeSpan? TrialTimeout { get { throw null; } set { } } } @@ -4850,30 +7867,93 @@ public TensorFlowDistributionConfiguration() { } public int? ParameterServerCount { get { throw null; } set { } } public int? WorkerCount { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TextAnnotationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextAnnotationType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.TextAnnotationType Classification { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.TextAnnotationType NamedEntityRecognition { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.TextAnnotationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.TextAnnotationType left, Azure.ResourceManager.MachineLearning.Models.TextAnnotationType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.TextAnnotationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.TextAnnotationType left, Azure.ResourceManager.MachineLearning.Models.TextAnnotationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class TextClassification : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { public TextClassification(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public string FeaturizationDatasetLanguage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NlpFixedParameters FixedParameters { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NlpSweepSettings SweepSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } } public partial class TextClassificationMultilabel : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { public TextClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public string FeaturizationDatasetLanguage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NlpFixedParameters FixedParameters { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? PrimaryMetric { get { throw null; } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NlpSweepSettings SweepSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } } public partial class TextNer : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { public TextNer(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public string FeaturizationDatasetLanguage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NlpFixedParameters FixedParameters { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NlpSweepSettings SweepSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } } + public partial class TopNFeaturesByAttribution : Azure.ResourceManager.MachineLearning.Models.MonitoringFeatureFilterBase + { + public TopNFeaturesByAttribution() { } + public int? Top { get { throw null; } set { } } + } + public partial class TrailingInputData : Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase + { + public TrailingInputData(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri, System.TimeSpan windowOffset, System.TimeSpan windowSize) : base (default(Azure.ResourceManager.MachineLearning.Models.JobInputType), default(System.Uri)) { } + public string PreprocessingComponentId { get { throw null; } set { } } + public System.TimeSpan WindowOffset { get { throw null; } set { } } + public System.TimeSpan WindowSize { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TrainingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TrainingMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.TrainingMode Auto { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.TrainingMode Distributed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.TrainingMode NonDistributed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.TrainingMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.TrainingMode left, Azure.ResourceManager.MachineLearning.Models.TrainingMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.TrainingMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.TrainingMode left, Azure.ResourceManager.MachineLearning.Models.TrainingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TritonInferencingServer : Azure.ResourceManager.MachineLearning.Models.InferencingServer + { + public TritonInferencingServer() { } + public Azure.ResourceManager.MachineLearning.Models.OnlineInferenceConfiguration InferenceConfiguration { get { throw null; } set { } } + } public partial class TruncationSelectionPolicy : Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy { public TruncationSelectionPolicy() { } @@ -4899,4 +7979,55 @@ public TruncationSelectionPolicy() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ValidationMetricType left, Azure.ResourceManager.MachineLearning.Models.ValidationMetricType right) { throw null; } public override string ToString() { throw null; } } + public partial class VolumeDefinition + { + public VolumeDefinition() { } + public Azure.ResourceManager.MachineLearning.Models.MountBindOptions Bind { get { throw null; } set { } } + public string Consistency { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType? DefinitionType { get { throw null; } set { } } + public bool? Nocopy { get { throw null; } set { } } + public bool? ReadOnly { get { throw null; } set { } } + public string Source { get { throw null; } set { } } + public string Target { get { throw null; } set { } } + public int? TmpfsSize { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VolumeDefinitionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VolumeDefinitionType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType Bind { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType Npipe { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType Tmpfs { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType Volume { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType left, Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType left, Azure.ResourceManager.MachineLearning.Models.VolumeDefinitionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WorkspaceConnectionAccessKey + { + public WorkspaceConnectionAccessKey() { } + public string AccessKeyId { get { throw null; } set { } } + public string SecretAccessKey { get { throw null; } set { } } + } + public partial class WorkspaceConnectionServicePrincipal + { + public WorkspaceConnectionServicePrincipal() { } + public string ClientId { get { throw null; } set { } } + public string ClientSecret { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + } + public partial class WorkspaceHubConfig + { + public WorkspaceHubConfig() { } + public System.Collections.Generic.IList AdditionalWorkspaceStorageAccounts { get { throw null; } } + public string DefaultWorkspaceResourceGroup { get { throw null; } set { } } + } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs new file mode 100644 index 0000000000000..a1f06f30deff8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearninRegistryComponentContainerCollection + { + // List Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/list.json + // this example is just showing the usage of "RegistryComponentContainers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearninRegistryComponentContainerResource + MachineLearninRegistryComponentContainerCollection collection = machineLearningRegistry.GetMachineLearninRegistryComponentContainers(); + + // invoke the operation and iterate over the result + await foreach (MachineLearninRegistryComponentContainerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentContainerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/get.json + // this example is just showing the usage of "RegistryComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearninRegistryComponentContainerResource + MachineLearninRegistryComponentContainerCollection collection = machineLearningRegistry.GetMachineLearninRegistryComponentContainers(); + + // invoke the operation + string componentName = "string"; + MachineLearninRegistryComponentContainerResource result = await collection.GetAsync(componentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/get.json + // this example is just showing the usage of "RegistryComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearninRegistryComponentContainerResource + MachineLearninRegistryComponentContainerCollection collection = machineLearningRegistry.GetMachineLearninRegistryComponentContainers(); + + // invoke the operation + string componentName = "string"; + bool result = await collection.ExistsAsync(componentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/get.json + // this example is just showing the usage of "RegistryComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearninRegistryComponentContainerResource + MachineLearninRegistryComponentContainerCollection collection = machineLearningRegistry.GetMachineLearninRegistryComponentContainers(); + + // invoke the operation + string componentName = "string"; + NullableResponse response = await collection.GetIfExistsAsync(componentName); + MachineLearninRegistryComponentContainerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryComponentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearninRegistryComponentContainerResource + MachineLearninRegistryComponentContainerCollection collection = machineLearningRegistry.GetMachineLearninRegistryComponentContainers(); + + // invoke the operation + string componentName = "string"; + MachineLearningComponentContainerData data = new MachineLearningComponentContainerData(new MachineLearningComponentContainerProperties() + { + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, componentName, data); + MachineLearninRegistryComponentContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs new file mode 100644 index 0000000000000..bb1f4a1ad4ce8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearninRegistryComponentContainerResource + { + // Delete Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/delete.json + // this example is just showing the usage of "RegistryComponentContainers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // invoke the operation + await machineLearninRegistryComponentContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/get.json + // this example is just showing the usage of "RegistryComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // invoke the operation + MachineLearninRegistryComponentContainerResource result = await machineLearninRegistryComponentContainer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Component Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryComponentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryComponentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // invoke the operation + MachineLearningComponentContainerData data = new MachineLearningComponentContainerData(new MachineLearningComponentContainerProperties() + { + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearninRegistryComponentContainer.UpdateAsync(WaitUntil.Completed, data); + MachineLearninRegistryComponentContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs new file mode 100644 index 0000000000000..d08149bf59f55 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearninRegistryComponentVersionCollection + { + // List Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/list.json + // this example is just showing the usage of "RegistryComponentVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // get the collection of this MachineLearninRegistryComponentVersionResource + MachineLearninRegistryComponentVersionCollection collection = machineLearninRegistryComponentContainer.GetMachineLearninRegistryComponentVersions(); + + // invoke the operation and iterate over the result + string orderBy = "string"; + int? top = 1; + await foreach (MachineLearninRegistryComponentVersionResource item in collection.GetAllAsync(orderBy: orderBy, top: top)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/get.json + // this example is just showing the usage of "RegistryComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // get the collection of this MachineLearninRegistryComponentVersionResource + MachineLearninRegistryComponentVersionCollection collection = machineLearninRegistryComponentContainer.GetMachineLearninRegistryComponentVersions(); + + // invoke the operation + string version = "string"; + MachineLearninRegistryComponentVersionResource result = await collection.GetAsync(version); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/get.json + // this example is just showing the usage of "RegistryComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // get the collection of this MachineLearninRegistryComponentVersionResource + MachineLearninRegistryComponentVersionCollection collection = machineLearninRegistryComponentContainer.GetMachineLearninRegistryComponentVersions(); + + // invoke the operation + string version = "string"; + bool result = await collection.ExistsAsync(version); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/get.json + // this example is just showing the usage of "RegistryComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // get the collection of this MachineLearninRegistryComponentVersionResource + MachineLearninRegistryComponentVersionCollection collection = machineLearninRegistryComponentContainer.GetMachineLearninRegistryComponentVersions(); + + // invoke the operation + string version = "string"; + NullableResponse response = await collection.GetIfExistsAsync(version); + MachineLearninRegistryComponentVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryComponentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentContainerResource created on azure + // for more information of creating MachineLearninRegistryComponentContainerResource, please refer to the document of MachineLearninRegistryComponentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + ResourceIdentifier machineLearninRegistryComponentContainerResourceId = MachineLearninRegistryComponentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName); + MachineLearninRegistryComponentContainerResource machineLearninRegistryComponentContainer = client.GetMachineLearninRegistryComponentContainerResource(machineLearninRegistryComponentContainerResourceId); + + // get the collection of this MachineLearninRegistryComponentVersionResource + MachineLearninRegistryComponentVersionCollection collection = machineLearninRegistryComponentContainer.GetMachineLearninRegistryComponentVersions(); + + // invoke the operation + string version = "string"; + MachineLearningComponentVersionData data = new MachineLearningComponentVersionData(new MachineLearningComponentVersionProperties() + { + ComponentSpec = BinaryData.FromObjectAsJson(new Dictionary() + { + ["8ced901b-d826-477d-bfef-329da9672513"] = null + }), + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); + MachineLearninRegistryComponentVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs new file mode 100644 index 0000000000000..0a06e1b4817c0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearninRegistryComponentVersionResource + { + // Delete Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/delete.json + // this example is just showing the usage of "RegistryComponentVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentVersionResource created on azure + // for more information of creating MachineLearninRegistryComponentVersionResource, please refer to the document of MachineLearninRegistryComponentVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + string version = "string"; + ResourceIdentifier machineLearninRegistryComponentVersionResourceId = MachineLearninRegistryComponentVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName, version); + MachineLearninRegistryComponentVersionResource machineLearninRegistryComponentVersion = client.GetMachineLearninRegistryComponentVersionResource(machineLearninRegistryComponentVersionResourceId); + + // invoke the operation + await machineLearninRegistryComponentVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/get.json + // this example is just showing the usage of "RegistryComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentVersionResource created on azure + // for more information of creating MachineLearninRegistryComponentVersionResource, please refer to the document of MachineLearninRegistryComponentVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + string version = "string"; + ResourceIdentifier machineLearninRegistryComponentVersionResourceId = MachineLearninRegistryComponentVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName, version); + MachineLearninRegistryComponentVersionResource machineLearninRegistryComponentVersion = client.GetMachineLearninRegistryComponentVersionResource(machineLearninRegistryComponentVersionResourceId); + + // invoke the operation + MachineLearninRegistryComponentVersionResource result = await machineLearninRegistryComponentVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Component Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryComponentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ComponentVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryComponentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearninRegistryComponentVersionResource created on azure + // for more information of creating MachineLearninRegistryComponentVersionResource, please refer to the document of MachineLearninRegistryComponentVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string componentName = "string"; + string version = "string"; + ResourceIdentifier machineLearninRegistryComponentVersionResourceId = MachineLearninRegistryComponentVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, componentName, version); + MachineLearninRegistryComponentVersionResource machineLearninRegistryComponentVersion = client.GetMachineLearninRegistryComponentVersionResource(machineLearninRegistryComponentVersionResourceId); + + // invoke the operation + MachineLearningComponentVersionData data = new MachineLearningComponentVersionData(new MachineLearningComponentVersionProperties() + { + ComponentSpec = BinaryData.FromObjectAsJson(new Dictionary() + { + ["8ced901b-d826-477d-bfef-329da9672513"] = null + }), + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearninRegistryComponentVersion.UpdateAsync(WaitUntil.Completed, data); + MachineLearninRegistryComponentVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningComponentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs index 1a158856d9e35..3d71eda9b41df 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs @@ -21,12 +21,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningBatchDeploymentCollection { - // List Batch Deployment. + // List Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListBatchDeployment() + public async Task GetAll_ListWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/list.json // this example is just showing the usage of "BatchDeployments_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,12 +61,12 @@ public async Task GetAll_ListBatchDeployment() Console.WriteLine($"Succeeded"); } - // Get Batch Deployment. + // Get Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetBatchDeployment() + public async Task Get_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,12 +97,12 @@ public async Task Get_GetBatchDeployment() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Batch Deployment. + // Get Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetBatchDeployment() + public async Task Exists_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,12 +129,12 @@ public async Task Exists_GetBatchDeployment() Console.WriteLine($"Succeeded: {result}"); } - // Get Batch Deployment. + // Get Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetBatchDeployment() + public async Task GetIfExists_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,12 +173,12 @@ public async Task GetIfExists_GetBatchDeployment() } } - // CreateOrUpdate Batch Deployment. + // CreateOrUpdate Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateBatchDeployment() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/createOrUpdate.json // this example is just showing the usage of "BatchDeployments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs index 85b78177e181b..75d7e1ff3210c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningBatchDeploymentResource { - // Delete Batch Deployment. + // Delete Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteBatchDeployment() + public async Task Delete_DeleteWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/delete.json // this example is just showing the usage of "BatchDeployments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,12 +47,12 @@ public async Task Delete_DeleteBatchDeployment() Console.WriteLine($"Succeeded"); } - // Get Batch Deployment. + // Get Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetBatchDeployment() + public async Task Get_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,12 +80,12 @@ public async Task Get_GetBatchDeployment() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Update Batch Deployment. + // Update Workspace Batch Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateBatchDeployment() + public async Task Update_UpdateWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchDeployment/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchDeployment/update.json // this example is just showing the usage of "BatchDeployments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs index ce396a7f21fee..1c136a3c7e37f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs @@ -19,12 +19,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningBatchEndpointCollection { - // List Batch Endpoint. + // List Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListBatchEndpoint() + public async Task GetAll_ListWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/list.json // this example is just showing the usage of "BatchEndpoints_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,12 +57,12 @@ public async Task GetAll_ListBatchEndpoint() Console.WriteLine($"Succeeded"); } - // Get Batch Endpoint. + // Get Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetBatchEndpoint() + public async Task Get_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,12 +92,12 @@ public async Task Get_GetBatchEndpoint() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Batch Endpoint. + // Get Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetBatchEndpoint() + public async Task Exists_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,12 +123,12 @@ public async Task Exists_GetBatchEndpoint() Console.WriteLine($"Succeeded: {result}"); } - // Get Batch Endpoint. + // Get Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetBatchEndpoint() + public async Task GetIfExists_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,12 +166,12 @@ public async Task GetIfExists_GetBatchEndpoint() } } - // CreateOrUpdate Batch Endpoint. + // CreateOrUpdate Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateBatchEndpoint() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/createOrUpdate.json // this example is just showing the usage of "BatchEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs index fcf61ed53f583..520f31355cd60 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs @@ -19,12 +19,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningBatchEndpointResource { - // Delete Batch Endpoint. + // Delete Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteBatchEndpoint() + public async Task Delete_DeleteWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/delete.json // this example is just showing the usage of "BatchEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,12 +47,12 @@ public async Task Delete_DeleteBatchEndpoint() Console.WriteLine($"Succeeded"); } - // Get Batch Endpoint. + // Get Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetBatchEndpoint() + public async Task Get_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,12 +79,12 @@ public async Task Get_GetBatchEndpoint() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Update Batch Endpoint. + // Update Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateBatchEndpoint() + public async Task Update_UpdateWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/update.json // this example is just showing the usage of "BatchEndpoints_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,12 +128,12 @@ public async Task Update_UpdateBatchEndpoint() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // ListKeys Batch Endpoint. + // ListKeys Workspace Batch Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetKeys_ListKeysBatchEndpoint() + public async Task GetKeys_ListKeysWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/BatchEndpoint/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/BatchEndpoint/listKeys.json // this example is just showing the usage of "BatchEndpoints_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs index 96de78d62c200..b831eea70d72d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningCodeContainerCollection { - // List Code Container. + // List Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListCodeContainer() + public async Task GetAll_ListWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/list.json // this example is just showing the usage of "CodeContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,12 +55,12 @@ public async Task GetAll_ListCodeContainer() Console.WriteLine($"Succeeded"); } - // Get Code Container. + // Get Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetCodeContainer() + public async Task Get_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,12 +90,12 @@ public async Task Get_GetCodeContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Code Container. + // Get Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetCodeContainer() + public async Task Exists_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,12 +121,12 @@ public async Task Exists_GetCodeContainer() Console.WriteLine($"Succeeded: {result}"); } - // Get Code Container. + // Get Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetCodeContainer() + public async Task GetIfExists_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,12 +164,12 @@ public async Task GetIfExists_GetCodeContainer() } } - // CreateOrUpdate Code Container. + // CreateOrUpdate Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateCodeContainer() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/createOrUpdate.json // this example is just showing the usage of "CodeContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs index 9ac7ec0316034..4aff395b3e327 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningCodeContainerResource { - // Delete Code Container. + // Delete Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteCodeContainer() + public async Task Delete_DeleteWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/delete.json // this example is just showing the usage of "CodeContainers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,12 +46,12 @@ public async Task Delete_DeleteCodeContainer() Console.WriteLine($"Succeeded"); } - // Get Code Container. + // Get Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetCodeContainer() + public async Task Get_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,12 +78,12 @@ public async Task Get_GetCodeContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Code Container. + // CreateOrUpdate Workspace Code Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateCodeContainer() + public async Task Update_CreateOrUpdateWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeContainer/createOrUpdate.json // this example is just showing the usage of "CodeContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs index ca4879daf7546..e381822dc6325 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningCodeVersionCollection { - // List Code Version. + // List Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListCodeVersion() + public async Task GetAll_ListWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/list.json // this example is just showing the usage of "CodeVersions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,12 +58,12 @@ public async Task GetAll_ListCodeVersion() Console.WriteLine($"Succeeded"); } - // Get Code Version. + // Get Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetCodeVersion() + public async Task Get_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,12 +94,12 @@ public async Task Get_GetCodeVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Code Version. + // Get Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetCodeVersion() + public async Task Exists_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,12 +126,12 @@ public async Task Exists_GetCodeVersion() Console.WriteLine($"Succeeded: {result}"); } - // Get Code Version. + // Get Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetCodeVersion() + public async Task GetIfExists_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,12 +170,12 @@ public async Task GetIfExists_GetCodeVersion() } } - // CreateOrUpdate Code Version. + // CreateOrUpdate Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateCodeVersion() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/createOrUpdate.json // this example is just showing the usage of "CodeVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs index e301726004a66..1a490899955d2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningCodeVersionResource { - // Delete Code Version. + // Delete Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteCodeVersion() + public async Task Delete_DeleteWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/delete.json // this example is just showing the usage of "CodeVersions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,12 +47,12 @@ public async Task Delete_DeleteCodeVersion() Console.WriteLine($"Succeeded"); } - // Get Code Version. + // Get Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetCodeVersion() + public async Task Get_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,12 +80,12 @@ public async Task Get_GetCodeVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Code Version. + // CreateOrUpdate Workspace Code Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateCodeVersion() + public async Task Update_CreateOrUpdateWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/CodeVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/createOrUpdate.json // this example is just showing the usage of "CodeVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,5 +127,39 @@ public async Task Update_CreateOrUpdateCodeVersion() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // CreateOrGetStartPendingUpload Workspace Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadWorkspaceCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + // this example is just showing the usage of "CodeVersions_CreateOrGetStartPendingUpload" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningCodeVersionResource created on azure + // for more information of creating MachineLearningCodeVersionResource, please refer to the document of MachineLearningCodeVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningCodeVersionResourceId = MachineLearningCodeVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningCodeVersionResource machineLearningCodeVersion = client.GetMachineLearningCodeVersionResource(machineLearningCodeVersionResourceId); + + // invoke the operation + PendingUploadRequestDto body = new PendingUploadRequestDto() + { + PendingUploadId = "string", + PendingUploadType = PendingUploadType.TemporaryBlobReference, + }; + PendingUploadResponseDto result = await machineLearningCodeVersion.CreateOrGetStartPendingUploadAsync(body); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs index b03fc57e939f2..6add5fae5b6c6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningComponentContainerCollection { - // List Component Container. + // List Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListComponentContainer() + public async Task GetAll_ListWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/list.json // this example is just showing the usage of "ComponentContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,12 +55,12 @@ public async Task GetAll_ListComponentContainer() Console.WriteLine($"Succeeded"); } - // Get Component Container. + // Get Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetComponentContainer() + public async Task Get_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,12 +90,12 @@ public async Task Get_GetComponentContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Component Container. + // Get Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetComponentContainer() + public async Task Exists_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,12 +121,12 @@ public async Task Exists_GetComponentContainer() Console.WriteLine($"Succeeded: {result}"); } - // Get Component Container. + // Get Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetComponentContainer() + public async Task GetIfExists_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,12 +164,12 @@ public async Task GetIfExists_GetComponentContainer() } } - // CreateOrUpdate Component Container. + // CreateOrUpdate Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateComponentContainer() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/createOrUpdate.json // this example is just showing the usage of "ComponentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs index 3e74a5e3af9f5..82ca47313064a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningComponentContainerResource { - // Delete Component Container. + // Delete Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteComponentContainer() + public async Task Delete_DeleteWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/delete.json // this example is just showing the usage of "ComponentContainers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,12 +46,12 @@ public async Task Delete_DeleteComponentContainer() Console.WriteLine($"Succeeded"); } - // Get Component Container. + // Get Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetComponentContainer() + public async Task Get_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,12 +78,12 @@ public async Task Get_GetComponentContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Component Container. + // CreateOrUpdate Workspace Component Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateComponentContainer() + public async Task Update_CreateOrUpdateWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentContainer/createOrUpdate.json // this example is just showing the usage of "ComponentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs index 1094c490e1dc9..b960c0a19a8b8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs @@ -19,12 +19,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningComponentVersionCollection { - // List Component Version. + // List Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListComponentVersion() + public async Task GetAll_ListWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/list.json // this example is just showing the usage of "ComponentVersions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,12 +59,12 @@ public async Task GetAll_ListComponentVersion() Console.WriteLine($"Succeeded"); } - // Get Component Version. + // Get Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetComponentVersion() + public async Task Get_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,12 +95,12 @@ public async Task Get_GetComponentVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Component Version. + // Get Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetComponentVersion() + public async Task Exists_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,12 +127,12 @@ public async Task Exists_GetComponentVersion() Console.WriteLine($"Succeeded: {result}"); } - // Get Component Version. + // Get Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetComponentVersion() + public async Task GetIfExists_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,12 +171,12 @@ public async Task GetIfExists_GetComponentVersion() } } - // CreateOrUpdate Component Version. + // CreateOrUpdate Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateComponentVersion() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/createOrUpdate.json // this example is just showing the usage of "ComponentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs index 3d3ad2535aaa2..b1d4bd2c28d81 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs @@ -19,12 +19,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningComponentVersionResource { - // Delete Component Version. + // Delete Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteComponentVersion() + public async Task Delete_DeleteWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/delete.json // this example is just showing the usage of "ComponentVersions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,12 +48,12 @@ public async Task Delete_DeleteComponentVersion() Console.WriteLine($"Succeeded"); } - // Get Component Version. + // Get Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetComponentVersion() + public async Task Get_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,12 +81,12 @@ public async Task Get_GetComponentVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Component Version. + // CreateOrUpdate Workspace Component Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateComponentVersion() + public async Task Update_CreateOrUpdateWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ComponentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ComponentVersion/createOrUpdate.json // this example is just showing the usage of "ComponentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs index e8d7c64048f8c..85aa5e05772c0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_MachineLearningComputeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetComputes() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/list.json // this example is just showing the usage of "Compute_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_GetComputes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Exists_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +205,7 @@ public async Task Get_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task Exists_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +279,7 @@ public async Task GetIfExists_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -314,7 +314,7 @@ public async Task Get_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -345,7 +345,7 @@ public async Task Exists_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -388,7 +388,7 @@ public async Task GetIfExists_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -423,7 +423,7 @@ public async Task Get_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -454,7 +454,7 @@ public async Task Exists_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -497,7 +497,7 @@ public async Task GetIfExists_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AttachAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -570,7 +570,7 @@ public async Task CreateOrUpdate_AttachAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -627,7 +627,7 @@ public async Task CreateOrUpdate_CreateAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateADataFactoryCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -667,7 +667,7 @@ public async Task CreateOrUpdate_CreateADataFactoryCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -707,7 +707,7 @@ public async Task CreateOrUpdate_CreateAnAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -737,10 +737,56 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() VmSize = "STANDARD_NC6", SubnetId = new ResourceIdentifier("test-subnet-resource-id"), ApplicationSharingPolicy = MachineLearningApplicationSharingPolicy.Personal, + MlflowAutologger = MachineLearningFlowAutoLogger.Enabled, SshSettings = new MachineLearningComputeInstanceSshSettings() { SshPublicAccess = MachineLearningSshPublicAccess.Disabled, }, + CustomServices = +{ +new CustomService() +{ +Name = "rstudio-workbench", +Image = new ImageSetting() +{ +ImageType = ImageType.Docker, +Reference = "ghcr.io/azure/rstudio-workbench:latest", +}, +EnvironmentVariables = +{ +["RSP_LICENSE"] = new EnvironmentVariable() +{ +VariableType = EnvironmentVariableType.Local, +Value = "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX", +}, +}, +Docker = new DockerSetting() +{ +Privileged = true, +}, +Endpoints = +{ +new ContainerEndpoint() +{ +Protocol = ContainerCommunicationProtocol.Http, +Name = "connect", +Target = 8787, +Published = 4444, +HostIP = null, +} +}, +Volumes = +{ +new VolumeDefinition() +{ +DefinitionType = VolumeDefinitionType.Bind, +ReadOnly = true, +Source = "/mnt/azureuser/", +Target = "/home/testuser/", +} +}, +} +}, ComputeInstanceAuthorizationType = MachineLearningComputeInstanceAuthorizationType.Personal, PersonalComputeInstanceAssignedUser = new MachineLearningComputeInstanceAssignedUser("00000000-0000-0000-0000-000000000000", Guid.Parse("00000000-0000-0000-0000-000000000000")), }, @@ -761,7 +807,7 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -814,7 +860,7 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -860,7 +906,7 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/AmlCompute.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -911,7 +957,7 @@ public async Task CreateOrUpdate_UpdateAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateAnAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/createOrUpdate/AKSCompute.json // this example is just showing the usage of "Compute_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs index 16618e3b56ac5..7533a784625da 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading.Tasks; using System.Xml; using Azure; @@ -24,7 +25,7 @@ public partial class Sample_MachineLearningComputeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +57,7 @@ public async Task Get_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +89,7 @@ public async Task Get_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +121,7 @@ public async Task Get_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +153,7 @@ public async Task Get_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAAmlComputeCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/patch.json // this example is just showing the usage of "Compute_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -193,7 +194,7 @@ public async Task Update_UpdateAAmlComputeCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/delete.json // this example is just showing the usage of "Compute_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,12 +218,85 @@ public async Task Delete_DeleteCompute() Console.WriteLine($"Succeeded"); } + // Update Custom Services + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateCustomServices_UpdateCustomServices() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/updateCustomServices.json + // this example is just showing the usage of "Compute_UpdateCustomServices" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningComputeResource created on azure + // for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string workspaceName = "workspaces123"; + string computeName = "compute123"; + ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName); + MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId); + + // invoke the operation + IEnumerable customServices = new CustomService[] + { +new CustomService() +{ +Name = "rstudio-workbench", +Image = new ImageSetting() +{ +ImageType = ImageType.Docker, +Reference = "ghcr.io/azure/rstudio-workbench:latest", +}, +EnvironmentVariables = +{ +["RSP_LICENSE"] = new EnvironmentVariable() +{ +VariableType = EnvironmentVariableType.Local, +Value = "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX", +}, +}, +Docker = new DockerSetting() +{ +Privileged = true, +}, +Endpoints = +{ +new ContainerEndpoint() +{ +Protocol = ContainerCommunicationProtocol.Http, +Name = "connect", +Target = 8787, +Published = 4444, +HostIP = null, +} +}, +Volumes = +{ +new VolumeDefinition() +{ +DefinitionType = VolumeDefinitionType.Bind, +ReadOnly = true, +Source = "/mnt/azureuser/", +Target = "/home/testuser/", +} +}, +} + }; + await machineLearningCompute.UpdateCustomServicesAsync(customServices); + + Console.WriteLine($"Succeeded"); + } + // Get compute nodes information for a compute [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNodes_GetComputeNodesInformationForACompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/listNodes.json // this example is just showing the usage of "Compute_ListNodes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -253,7 +327,7 @@ public async Task GetNodes_GetComputeNodesInformationForACompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListAKSComputeKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/listKeys.json // this example is just showing the usage of "Compute_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -281,7 +355,7 @@ public async Task GetKeys_ListAKSComputeKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/start.json // this example is just showing the usage of "Compute_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -309,7 +383,7 @@ public async Task Start_StartComputeInstanceCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/stop.json // this example is just showing the usage of "Compute_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -337,7 +411,7 @@ public async Task Stop_StopComputeInstanceCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restart_RestartComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/restart.json // this example is just showing the usage of "Compute_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -359,5 +433,37 @@ public async Task Restart_RestartComputeInstanceCompute() Console.WriteLine($"Succeeded"); } + + // Update idle shutdown setting of ComputeInstance + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateIdleShutdownSetting_UpdateIdleShutdownSettingOfComputeInstance() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Compute/updateIdleShutdownSetting.json + // this example is just showing the usage of "Compute_UpdateIdleShutdownSetting" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningComputeResource created on azure + // for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string workspaceName = "workspaces123"; + string computeName = "compute123"; + ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName); + MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId); + + // invoke the operation + IdleShutdownSetting idleShutdownSetting = new IdleShutdownSetting() + { + IdleTimeBeforeShutdown = "PT120M", + }; + await machineLearningCompute.UpdateIdleShutdownSettingAsync(idleShutdownSetting); + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs index 8c805bf0ef4c7..84e5184d54f80 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningDataContainerCollection { - // List Data Container. + // List Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListDataContainer() + public async Task GetAll_ListWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/list.json // this example is just showing the usage of "DataContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,12 +55,12 @@ public async Task GetAll_ListDataContainer() Console.WriteLine($"Succeeded"); } - // Get Data Container. + // Get Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetDataContainer() + public async Task Get_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,12 +90,12 @@ public async Task Get_GetDataContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Data Container. + // Get Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetDataContainer() + public async Task Exists_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,12 +121,12 @@ public async Task Exists_GetDataContainer() Console.WriteLine($"Succeeded: {result}"); } - // Get Data Container. + // Get Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetDataContainer() + public async Task GetIfExists_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,12 +164,12 @@ public async Task GetIfExists_GetDataContainer() } } - // CreateOrUpdate Data Container. + // CreateOrUpdate Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateDataContainer() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/createOrUpdate.json // this example is just showing the usage of "DataContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs index b8d5a92600d50..601fcd8e178f6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningDataContainerResource { - // Delete Data Container. + // Delete Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteDataContainer() + public async Task Delete_DeleteWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/delete.json // this example is just showing the usage of "DataContainers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,12 +46,12 @@ public async Task Delete_DeleteDataContainer() Console.WriteLine($"Succeeded"); } - // Get Data Container. + // Get Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetDataContainer() + public async Task Get_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,12 +78,12 @@ public async Task Get_GetDataContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Data Container. + // CreateOrUpdate Workspace Data Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateDataContainer() + public async Task Update_CreateOrUpdateWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataContainer/createOrUpdate.json // this example is just showing the usage of "DataContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs index 62a7fcb9a26c8..eff59dfe1a0de 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningDataVersionCollection { - // List Data Version Base. + // List Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListDataVersionBase() + public async Task GetAll_ListWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/list.json // this example is just showing the usage of "DataVersions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -44,10 +44,8 @@ public async Task GetAll_ListDataVersionBase() MachineLearningDataVersionCollection collection = machineLearningDataContainer.GetMachineLearningDataVersions(); // invoke the operation and iterate over the result - string orderBy = "string"; - int? top = 1; - string tags = "string"; - await foreach (MachineLearningDataVersionResource item in collection.GetAllAsync(orderBy: orderBy, top: top, tags: tags)) + MachineLearningDataVersionCollectionGetAllOptions options = new MachineLearningDataVersionCollectionGetAllOptions() { OrderBy = "string", Top = 1, Tags = "string" }; + await foreach (MachineLearningDataVersionResource item in collection.GetAllAsync(options)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -59,12 +57,12 @@ public async Task GetAll_ListDataVersionBase() Console.WriteLine($"Succeeded"); } - // Get Data Version Base. + // Get Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetDataVersionBase() + public async Task Get_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,12 +93,12 @@ public async Task Get_GetDataVersionBase() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Data Version Base. + // Get Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetDataVersionBase() + public async Task Exists_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,12 +125,12 @@ public async Task Exists_GetDataVersionBase() Console.WriteLine($"Succeeded: {result}"); } - // Get Data Version Base. + // Get Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetDataVersionBase() + public async Task GetIfExists_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,12 +169,12 @@ public async Task GetIfExists_GetDataVersionBase() } } - // CreateOrUpdate Data Version Base. + // CreateOrUpdate Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateDataVersionBase() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/createOrUpdate.json // this example is just showing the usage of "DataVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs index 7fd2eaeb2f30e..5c5c034ed067d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningDataVersionResource { - // Delete Data Version Base. + // Delete Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteDataVersionBase() + public async Task Delete_DeleteWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/delete.json // this example is just showing the usage of "DataVersions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,12 +47,12 @@ public async Task Delete_DeleteDataVersionBase() Console.WriteLine($"Succeeded"); } - // Get Data Version Base. + // Get Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetDataVersionBase() + public async Task Get_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,12 +80,12 @@ public async Task Get_GetDataVersionBase() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Data Version Base. + // CreateOrUpdate Workspace Data Version Base. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateDataVersionBase() + public async Task Update_CreateOrUpdateWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/DataVersionBase/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/DataVersionBase/createOrUpdate.json // this example is just showing the usage of "DataVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs index c6ea0567342db..aa20c7d06355e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_MachineLearningDatastoreCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/get.json // this example is just showing the usage of "Datastores_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/get.json // this example is just showing the usage of "Datastores_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/get.json // this example is just showing the usage of "Datastores_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +244,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -297,7 +297,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs index bc7c2d0e45003..51016b3a31395 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs @@ -23,7 +23,7 @@ public partial class Sample_MachineLearningDatastoreResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/delete.json // this example is just showing the usage of "Datastores_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/get.json // this example is just showing the usage of "Datastores_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincip [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -189,7 +189,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincip [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureFileStoreWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -239,7 +239,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureFileStoreWAccountKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureBlobWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +291,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureBlobWAccountKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_GetDatastoreSecrets() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/listSecrets.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Datastore/listSecrets.json // this example is just showing the usage of "Datastores_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs index 93ee488f4697f..0604985eec4aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningEnvironmentContainerCollection { - // List Environment Container. + // List Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListEnvironmentContainer() + public async Task GetAll_ListWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/list.json // this example is just showing the usage of "EnvironmentContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,12 +55,12 @@ public async Task GetAll_ListEnvironmentContainer() Console.WriteLine($"Succeeded"); } - // Get Environment Container. + // Get Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEnvironmentContainer() + public async Task Get_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,12 +90,12 @@ public async Task Get_GetEnvironmentContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Environment Container. + // Get Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetEnvironmentContainer() + public async Task Exists_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,12 +121,12 @@ public async Task Exists_GetEnvironmentContainer() Console.WriteLine($"Succeeded: {result}"); } - // Get Environment Container. + // Get Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetEnvironmentContainer() + public async Task GetIfExists_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,12 +164,12 @@ public async Task GetIfExists_GetEnvironmentContainer() } } - // CreateOrUpdate Environment Container. + // CreateOrUpdate Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateEnvironmentContainer() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json // this example is just showing the usage of "EnvironmentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs index fd622694fb6cb..72c2622d9bc4e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningEnvironmentContainerResource { - // Delete Environment Container. + // Delete Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteEnvironmentContainer() + public async Task Delete_DeleteWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/delete.json // this example is just showing the usage of "EnvironmentContainers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,12 +46,12 @@ public async Task Delete_DeleteEnvironmentContainer() Console.WriteLine($"Succeeded"); } - // Get Environment Container. + // Get Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEnvironmentContainer() + public async Task Get_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,12 +78,12 @@ public async Task Get_GetEnvironmentContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Environment Container. + // CreateOrUpdate Workspace Environment Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateEnvironmentContainer() + public async Task Update_CreateOrUpdateWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json // this example is just showing the usage of "EnvironmentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs index 797614cb51eaf..56be920403ee6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningEnvironmentVersionCollection { - // List Environment Version. + // List Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListEnvironmentVersion() + public async Task GetAll_ListWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/list.json // this example is just showing the usage of "EnvironmentVersions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,12 +58,12 @@ public async Task GetAll_ListEnvironmentVersion() Console.WriteLine($"Succeeded"); } - // Get Environment Version. + // Get Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEnvironmentVersion() + public async Task Get_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,12 +94,12 @@ public async Task Get_GetEnvironmentVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Environment Version. + // Get Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetEnvironmentVersion() + public async Task Exists_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,12 +126,12 @@ public async Task Exists_GetEnvironmentVersion() Console.WriteLine($"Succeeded: {result}"); } - // Get Environment Version. + // Get Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetEnvironmentVersion() + public async Task GetIfExists_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,12 +170,12 @@ public async Task GetIfExists_GetEnvironmentVersion() } } - // CreateOrUpdate Environment Version. + // CreateOrUpdate Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateEnvironmentVersion() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json // this example is just showing the usage of "EnvironmentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs index dd8a7b781df5b..65354764bdbd6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningEnvironmentVersionResource { - // Delete Environment Version. + // Delete Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteEnvironmentVersion() + public async Task Delete_DeleteWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/delete.json // this example is just showing the usage of "EnvironmentVersions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,12 +47,12 @@ public async Task Delete_DeleteEnvironmentVersion() Console.WriteLine($"Succeeded"); } - // Get Environment Version. + // Get Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEnvironmentVersion() + public async Task Get_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,12 +80,12 @@ public async Task Get_GetEnvironmentVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Environment Version. + // CreateOrUpdate Workspace Environment Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateEnvironmentVersion() + public async Task Update_CreateOrUpdateWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json // this example is just showing the usage of "EnvironmentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs new file mode 100644 index 0000000000000..8d9b2d9b7f4c1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureCollection + { + // List Feature. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListFeature() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Feature/list.json + // this example is just showing the usage of "Features_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string featuresetName = "string"; + string featuresetVersion = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // get the collection of this MachineLearningFeatureResource + MachineLearningFeatureCollection collection = machineLearningFeatureSetVersion.GetMachineLearningFeatures(); + + // invoke the operation and iterate over the result + string tags = "string"; + string featureName = "string"; + string description = "string"; + await foreach (MachineLearningFeatureResource item in collection.GetAllAsync(tags: tags, featureName: featureName, description: description)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Feature. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetFeature() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Feature/get.json + // this example is just showing the usage of "Features_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string featuresetName = "string"; + string featuresetVersion = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // get the collection of this MachineLearningFeatureResource + MachineLearningFeatureCollection collection = machineLearningFeatureSetVersion.GetMachineLearningFeatures(); + + // invoke the operation + string featureName = "string"; + MachineLearningFeatureResource result = await collection.GetAsync(featureName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Feature. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetFeature() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Feature/get.json + // this example is just showing the usage of "Features_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string featuresetName = "string"; + string featuresetVersion = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // get the collection of this MachineLearningFeatureResource + MachineLearningFeatureCollection collection = machineLearningFeatureSetVersion.GetMachineLearningFeatures(); + + // invoke the operation + string featureName = "string"; + bool result = await collection.ExistsAsync(featureName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Feature. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetFeature() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Feature/get.json + // this example is just showing the usage of "Features_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string featuresetName = "string"; + string featuresetVersion = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // get the collection of this MachineLearningFeatureResource + MachineLearningFeatureCollection collection = machineLearningFeatureSetVersion.GetMachineLearningFeatures(); + + // invoke the operation + string featureName = "string"; + NullableResponse response = await collection.GetIfExistsAsync(featureName); + MachineLearningFeatureResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs new file mode 100644 index 0000000000000..c0d5a624a60ce --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureResource + { + // Get Feature. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetFeature() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Feature/get.json + // this example is just showing the usage of "Features_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureResource created on azure + // for more information of creating MachineLearningFeatureResource, please refer to the document of MachineLearningFeatureResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string featuresetName = "string"; + string featuresetVersion = "string"; + string featureName = "string"; + ResourceIdentifier machineLearningFeatureResourceId = MachineLearningFeatureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName); + MachineLearningFeatureResource machineLearningFeature = client.GetMachineLearningFeatureResource(machineLearningFeatureResourceId); + + // invoke the operation + MachineLearningFeatureResource result = await machineLearningFeature.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs new file mode 100644 index 0000000000000..aefe41905f952 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureSetContainerCollection + { + // List Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/list.json + // this example is just showing the usage of "FeaturesetContainers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureSetContainerResource + MachineLearningFeatureSetContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureSetContainers(); + + // invoke the operation and iterate over the result + MachineLearningFeatureSetContainerCollectionGetAllOptions options = new MachineLearningFeatureSetContainerCollectionGetAllOptions() { Tags = "string", ListViewType = MachineLearningListViewType.ArchivedOnly }; + await foreach (MachineLearningFeatureSetContainerResource item in collection.GetAllAsync(options)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetContainerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // GetEntity Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetEntityWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // this example is just showing the usage of "FeaturesetContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureSetContainerResource + MachineLearningFeatureSetContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureSetContainers(); + + // invoke the operation + string name = "string"; + MachineLearningFeatureSetContainerResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // GetEntity Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetEntityWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // this example is just showing the usage of "FeaturesetContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureSetContainerResource + MachineLearningFeatureSetContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureSetContainers(); + + // invoke the operation + string name = "string"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // GetEntity Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetEntityWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // this example is just showing the usage of "FeaturesetContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureSetContainerResource + MachineLearningFeatureSetContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureSetContainers(); + + // invoke the operation + string name = "string"; + NullableResponse response = await collection.GetIfExistsAsync(name); + MachineLearningFeatureSetContainerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/createOrUpdate.json + // this example is just showing the usage of "FeaturesetContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureSetContainerResource + MachineLearningFeatureSetContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureSetContainers(); + + // invoke the operation + string name = "string"; + MachineLearningFeatureSetContainerData data = new MachineLearningFeatureSetContainerData(new MachineLearningFeatureSetContainerProperties() + { + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + MachineLearningFeatureSetContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs new file mode 100644 index 0000000000000..38a2243fcdd00 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureSetContainerResource + { + // Delete Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/delete.json + // this example is just showing the usage of "FeaturesetContainers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // invoke the operation + await machineLearningFeatureSetContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // GetEntity Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetEntityWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // this example is just showing the usage of "FeaturesetContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // invoke the operation + MachineLearningFeatureSetContainerResource result = await machineLearningFeatureSetContainer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Workspace Featureset Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateWorkspaceFeaturesetContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetContainer/createOrUpdate.json + // this example is just showing the usage of "FeaturesetContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // invoke the operation + MachineLearningFeatureSetContainerData data = new MachineLearningFeatureSetContainerData(new MachineLearningFeatureSetContainerProperties() + { + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningFeatureSetContainer.UpdateAsync(WaitUntil.Completed, data); + MachineLearningFeatureSetContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs new file mode 100644 index 0000000000000..fb0eed2588a57 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureSetVersionCollection + { + // List Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/list.json + // this example is just showing the usage of "FeaturesetVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // get the collection of this MachineLearningFeatureSetVersionResource + MachineLearningFeatureSetVersionCollection collection = machineLearningFeatureSetContainer.GetMachineLearningFeatureSetVersions(); + + // invoke the operation and iterate over the result + MachineLearningFeatureSetVersionCollectionGetAllOptions options = new MachineLearningFeatureSetVersionCollectionGetAllOptions() { Tags = "string", ListViewType = MachineLearningListViewType.All }; + await foreach (MachineLearningFeatureSetVersionResource item in collection.GetAllAsync(options)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/get.json + // this example is just showing the usage of "FeaturesetVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // get the collection of this MachineLearningFeatureSetVersionResource + MachineLearningFeatureSetVersionCollection collection = machineLearningFeatureSetContainer.GetMachineLearningFeatureSetVersions(); + + // invoke the operation + string version = "string"; + MachineLearningFeatureSetVersionResource result = await collection.GetAsync(version); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/get.json + // this example is just showing the usage of "FeaturesetVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // get the collection of this MachineLearningFeatureSetVersionResource + MachineLearningFeatureSetVersionCollection collection = machineLearningFeatureSetContainer.GetMachineLearningFeatureSetVersions(); + + // invoke the operation + string version = "string"; + bool result = await collection.ExistsAsync(version); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/get.json + // this example is just showing the usage of "FeaturesetVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // get the collection of this MachineLearningFeatureSetVersionResource + MachineLearningFeatureSetVersionCollection collection = machineLearningFeatureSetContainer.GetMachineLearningFeatureSetVersions(); + + // invoke the operation + string version = "string"; + NullableResponse response = await collection.GetIfExistsAsync(version); + MachineLearningFeatureSetVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/createOrUpdate.json + // this example is just showing the usage of "FeaturesetVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetContainerResource created on azure + // for more information of creating MachineLearningFeatureSetContainerResource, please refer to the document of MachineLearningFeatureSetContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureSetContainerResourceId = MachineLearningFeatureSetContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureSetContainerResource machineLearningFeatureSetContainer = client.GetMachineLearningFeatureSetContainerResource(machineLearningFeatureSetContainerResourceId); + + // get the collection of this MachineLearningFeatureSetVersionResource + MachineLearningFeatureSetVersionCollection collection = machineLearningFeatureSetContainer.GetMachineLearningFeatureSetVersions(); + + // invoke the operation + string version = "string"; + MachineLearningFeatureSetVersionData data = new MachineLearningFeatureSetVersionData(new MachineLearningFeatureSetVersionProperties() + { + Entities = +{ +"string" +}, + MaterializationSettings = new MaterializationSettings() + { + Notification = new NotificationSetting() + { + EmailOn = +{ +EmailNotificationEnableType.JobFailed +}, + Emails = +{ +"string" +}, + }, + ResourceInstanceType = "string", + Schedule = new MachineLearningRecurrenceTrigger(MachineLearningRecurrenceFrequency.Day, 1) + { + Schedule = new MachineLearningRecurrenceSchedule(new int[] + { +1 + }, new int[] + { +1 + }) + { + MonthDays = +{ +1 +}, + WeekDays = +{ +MachineLearningDayOfWeek.Monday +}, + }, + EndTime = "string", + StartTime = "string", + TimeZone = "string", + }, + SparkConfiguration = +{ +["string"] = "string", +}, + StoreType = MaterializationStoreType.Online, + }, + SpecificationPath = "string", + Stage = "string", + IsAnonymous = false, + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); + MachineLearningFeatureSetVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs new file mode 100644 index 0000000000000..5157491e58e65 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureSetVersionResource + { + // Delete Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/delete.json + // this example is just showing the usage of "FeaturesetVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // invoke the operation + await machineLearningFeatureSetVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/get.json + // this example is just showing the usage of "FeaturesetVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // invoke the operation + MachineLearningFeatureSetVersionResource result = await machineLearningFeatureSetVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/createOrUpdate.json + // this example is just showing the usage of "FeaturesetVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // invoke the operation + MachineLearningFeatureSetVersionData data = new MachineLearningFeatureSetVersionData(new MachineLearningFeatureSetVersionProperties() + { + Entities = +{ +"string" +}, + MaterializationSettings = new MaterializationSettings() + { + Notification = new NotificationSetting() + { + EmailOn = +{ +EmailNotificationEnableType.JobFailed +}, + Emails = +{ +"string" +}, + }, + ResourceInstanceType = "string", + Schedule = new MachineLearningRecurrenceTrigger(MachineLearningRecurrenceFrequency.Day, 1) + { + Schedule = new MachineLearningRecurrenceSchedule(new int[] + { +1 + }, new int[] + { +1 + }) + { + MonthDays = +{ +1 +}, + WeekDays = +{ +MachineLearningDayOfWeek.Monday +}, + }, + EndTime = "string", + StartTime = "string", + TimeZone = "string", + }, + SparkConfiguration = +{ +["string"] = "string", +}, + StoreType = MaterializationStoreType.Online, + }, + SpecificationPath = "string", + Stage = "string", + IsAnonymous = false, + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningFeatureSetVersion.UpdateAsync(WaitUntil.Completed, data); + MachineLearningFeatureSetVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureSetVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Backfill Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Backfill_BackfillWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/backfill.json + // this example is just showing the usage of "FeaturesetVersions_Backfill" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // invoke the operation + FeatureSetVersionBackfillContent content = new FeatureSetVersionBackfillContent() + { + Description = "string", + DisplayName = "string", + FeatureWindow = new FeatureWindow() + { + FeatureWindowEnd = DateTimeOffset.Parse("2020-01-01T12:34:56.999+00:51"), + FeatureWindowStart = DateTimeOffset.Parse("2020-01-01T12:34:56.999+00:51"), + }, + ResourceInstanceType = "string", + SparkConfiguration = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }; + ArmOperation lro = await machineLearningFeatureSetVersion.BackfillAsync(WaitUntil.Completed, content); + MachineLearningFeatureSetJob result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // ListMaterializationJobs Workspace Featureset Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMaterializationJobs_ListMaterializationJobsWorkspaceFeaturesetVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturesetVersion/listMaterializationJobs.json + // this example is just showing the usage of "FeaturesetVersions_ListMaterializationJobs" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureSetVersionResource created on azure + // for more information of creating MachineLearningFeatureSetVersionResource, please refer to the document of MachineLearningFeatureSetVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeatureSetVersionResourceId = MachineLearningFeatureSetVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeatureSetVersionResource machineLearningFeatureSetVersion = client.GetMachineLearningFeatureSetVersionResource(machineLearningFeatureSetVersionResourceId); + + // invoke the operation and iterate over the result + string filters = "string"; + string featureWindowStart = "string"; + string featureWindowEnd = "string"; + await foreach (MachineLearningFeatureSetJob item in machineLearningFeatureSetVersion.GetMaterializationJobsAsync(filters: filters, featureWindowStart: featureWindowStart, featureWindowEnd: featureWindowEnd)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs new file mode 100644 index 0000000000000..882d0b120c321 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureStoreEntityContainerCollection + { + // List Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/list.json + // this example is just showing the usage of "FeaturestoreEntityContainers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureStoreEntityContainerResource + MachineLearningFeatureStoreEntityContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureStoreEntityContainers(); + + // invoke the operation and iterate over the result + MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions options = new MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions() { Tags = "string", ListViewType = MachineLearningListViewType.All }; + await foreach (MachineLearningFeatureStoreEntityContainerResource item in collection.GetAllAsync(options)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureStoreEntityContainerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // GetEntity Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetEntityWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureStoreEntityContainerResource + MachineLearningFeatureStoreEntityContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureStoreEntityContainers(); + + // invoke the operation + string name = "string"; + MachineLearningFeatureStoreEntityContainerResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureStoreEntityContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // GetEntity Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetEntityWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureStoreEntityContainerResource + MachineLearningFeatureStoreEntityContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureStoreEntityContainers(); + + // invoke the operation + string name = "string"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // GetEntity Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetEntityWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureStoreEntityContainerResource + MachineLearningFeatureStoreEntityContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureStoreEntityContainers(); + + // invoke the operation + string name = "string"; + NullableResponse response = await collection.GetIfExistsAsync(name); + MachineLearningFeatureStoreEntityContainerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureStoreEntityContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + // this example is just showing the usage of "FeaturestoreEntityContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningFeatureStoreEntityContainerResource + MachineLearningFeatureStoreEntityContainerCollection collection = machineLearningWorkspace.GetMachineLearningFeatureStoreEntityContainers(); + + // invoke the operation + string name = "string"; + MachineLearningFeatureStoreEntityContainerData data = new MachineLearningFeatureStoreEntityContainerData(new MachineLearningFeatureStoreEntityContainerProperties() + { + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + MachineLearningFeatureStoreEntityContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureStoreEntityContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs new file mode 100644 index 0000000000000..e28ffe24b5a71 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeatureStoreEntityContainerResource + { + // Delete Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/delete.json + // this example is just showing the usage of "FeaturestoreEntityContainers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // invoke the operation + await machineLearningFeatureStoreEntityContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // GetEntity Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetEntityWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // invoke the operation + MachineLearningFeatureStoreEntityContainerResource result = await machineLearningFeatureStoreEntityContainer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureStoreEntityContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Workspace Featurestore Entity Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateWorkspaceFeaturestoreEntityContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + // this example is just showing the usage of "FeaturestoreEntityContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // invoke the operation + MachineLearningFeatureStoreEntityContainerData data = new MachineLearningFeatureStoreEntityContainerData(new MachineLearningFeatureStoreEntityContainerProperties() + { + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningFeatureStoreEntityContainer.UpdateAsync(WaitUntil.Completed, data); + MachineLearningFeatureStoreEntityContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeatureStoreEntityContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs new file mode 100644 index 0000000000000..dba359c9996bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeaturestoreEntityVersionCollection + { + // List Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/list.json + // this example is just showing the usage of "FeaturestoreEntityVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // get the collection of this MachineLearningFeaturestoreEntityVersionResource + MachineLearningFeaturestoreEntityVersionCollection collection = machineLearningFeatureStoreEntityContainer.GetMachineLearningFeaturestoreEntityVersions(); + + // invoke the operation and iterate over the result + MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions options = new MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions() { Tags = "string", ListViewType = MachineLearningListViewType.ActiveOnly }; + await foreach (MachineLearningFeaturestoreEntityVersionResource item in collection.GetAllAsync(options)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeaturestoreEntityVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // this example is just showing the usage of "FeaturestoreEntityVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // get the collection of this MachineLearningFeaturestoreEntityVersionResource + MachineLearningFeaturestoreEntityVersionCollection collection = machineLearningFeatureStoreEntityContainer.GetMachineLearningFeaturestoreEntityVersions(); + + // invoke the operation + string version = "string"; + MachineLearningFeaturestoreEntityVersionResource result = await collection.GetAsync(version); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeaturestoreEntityVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // this example is just showing the usage of "FeaturestoreEntityVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // get the collection of this MachineLearningFeaturestoreEntityVersionResource + MachineLearningFeaturestoreEntityVersionCollection collection = machineLearningFeatureStoreEntityContainer.GetMachineLearningFeaturestoreEntityVersions(); + + // invoke the operation + string version = "string"; + bool result = await collection.ExistsAsync(version); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // this example is just showing the usage of "FeaturestoreEntityVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // get the collection of this MachineLearningFeaturestoreEntityVersionResource + MachineLearningFeaturestoreEntityVersionCollection collection = machineLearningFeatureStoreEntityContainer.GetMachineLearningFeaturestoreEntityVersions(); + + // invoke the operation + string version = "string"; + NullableResponse response = await collection.GetIfExistsAsync(version); + MachineLearningFeaturestoreEntityVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeaturestoreEntityVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + // this example is just showing the usage of "FeaturestoreEntityVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeatureStoreEntityContainerResource created on azure + // for more information of creating MachineLearningFeatureStoreEntityContainerResource, please refer to the document of MachineLearningFeatureStoreEntityContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + ResourceIdentifier machineLearningFeatureStoreEntityContainerResourceId = MachineLearningFeatureStoreEntityContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name); + MachineLearningFeatureStoreEntityContainerResource machineLearningFeatureStoreEntityContainer = client.GetMachineLearningFeatureStoreEntityContainerResource(machineLearningFeatureStoreEntityContainerResourceId); + + // get the collection of this MachineLearningFeaturestoreEntityVersionResource + MachineLearningFeaturestoreEntityVersionCollection collection = machineLearningFeatureStoreEntityContainer.GetMachineLearningFeaturestoreEntityVersions(); + + // invoke the operation + string version = "string"; + MachineLearningFeaturestoreEntityVersionData data = new MachineLearningFeaturestoreEntityVersionData(new MachineLearningFeatureStoreEntityVersionProperties() + { + IndexColumns = +{ +new IndexColumn() +{ +ColumnName = "string", +DataType = FeatureDataType.Datetime, +} +}, + IsAnonymous = false, + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); + MachineLearningFeaturestoreEntityVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeaturestoreEntityVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs new file mode 100644 index 0000000000000..0ba6b513a2a95 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningFeaturestoreEntityVersionResource + { + // Delete Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/delete.json + // this example is just showing the usage of "FeaturestoreEntityVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeaturestoreEntityVersionResource created on azure + // for more information of creating MachineLearningFeaturestoreEntityVersionResource, please refer to the document of MachineLearningFeaturestoreEntityVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeaturestoreEntityVersionResourceId = MachineLearningFeaturestoreEntityVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeaturestoreEntityVersionResource machineLearningFeaturestoreEntityVersion = client.GetMachineLearningFeaturestoreEntityVersionResource(machineLearningFeaturestoreEntityVersionResourceId); + + // invoke the operation + await machineLearningFeaturestoreEntityVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // this example is just showing the usage of "FeaturestoreEntityVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeaturestoreEntityVersionResource created on azure + // for more information of creating MachineLearningFeaturestoreEntityVersionResource, please refer to the document of MachineLearningFeaturestoreEntityVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeaturestoreEntityVersionResourceId = MachineLearningFeaturestoreEntityVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeaturestoreEntityVersionResource machineLearningFeaturestoreEntityVersion = client.GetMachineLearningFeaturestoreEntityVersionResource(machineLearningFeaturestoreEntityVersionResourceId); + + // invoke the operation + MachineLearningFeaturestoreEntityVersionResource result = await machineLearningFeaturestoreEntityVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeaturestoreEntityVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Workspace Featurestore Entity Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateWorkspaceFeaturestoreEntityVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + // this example is just showing the usage of "FeaturestoreEntityVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningFeaturestoreEntityVersionResource created on azure + // for more information of creating MachineLearningFeaturestoreEntityVersionResource, please refer to the document of MachineLearningFeaturestoreEntityVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningFeaturestoreEntityVersionResourceId = MachineLearningFeaturestoreEntityVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningFeaturestoreEntityVersionResource machineLearningFeaturestoreEntityVersion = client.GetMachineLearningFeaturestoreEntityVersionResource(machineLearningFeaturestoreEntityVersionResourceId); + + // invoke the operation + MachineLearningFeaturestoreEntityVersionData data = new MachineLearningFeaturestoreEntityVersionData(new MachineLearningFeatureStoreEntityVersionProperties() + { + IndexColumns = +{ +new IndexColumn() +{ +ColumnName = "string", +DataType = FeatureDataType.Datetime, +} +}, + IsAnonymous = false, + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningFeaturestoreEntityVersion.UpdateAsync(WaitUntil.Completed, data); + MachineLearningFeaturestoreEntityVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningFeaturestoreEntityVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs index 728ba8bf3937c..21029b3cb1bbe 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs @@ -25,7 +25,7 @@ public partial class Sample_MachineLearningJobCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/AutoMLJob/list.json // this example is just showing the usage of "Jobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,7 +45,8 @@ public async Task GetAll_ListAutoMLJob() MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); // invoke the operation and iterate over the result - await foreach (MachineLearningJobResource item in collection.GetAllAsync()) + MachineLearningJobCollectionGetAllOptions options = new MachineLearningJobCollectionGetAllOptions() { JobType = "string", Tag = "string", ListViewType = MachineLearningListViewType.All, AssetName = "string", Scheduled = false, ScheduleId = "string" }; + await foreach (MachineLearningJobResource item in collection.GetAllAsync(options)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -62,7 +63,7 @@ public async Task GetAll_ListAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/CommandJob/list.json // this example is just showing the usage of "Jobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,9 +83,8 @@ public async Task GetAll_ListCommandJob() MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); // invoke the operation and iterate over the result - string jobType = "string"; - string tag = "string"; - await foreach (MachineLearningJobResource item in collection.GetAllAsync(jobType: jobType, tag: tag)) + MachineLearningJobCollectionGetAllOptions options = new MachineLearningJobCollectionGetAllOptions() { JobType = "string", Tag = "string", ListViewType = MachineLearningListViewType.ActiveOnly, AssetName = "string", Scheduled = false, ScheduleId = "string" }; + await foreach (MachineLearningJobResource item in collection.GetAllAsync(options)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -101,7 +101,7 @@ public async Task GetAll_ListCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/PipelineJob/list.json // this example is just showing the usage of "Jobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,9 +121,8 @@ public async Task GetAll_ListPipelineJob() MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); // invoke the operation and iterate over the result - string jobType = "string"; - string tag = "string"; - await foreach (MachineLearningJobResource item in collection.GetAllAsync(jobType: jobType, tag: tag)) + MachineLearningJobCollectionGetAllOptions options = new MachineLearningJobCollectionGetAllOptions() { JobType = "string", Tag = "string" }; + await foreach (MachineLearningJobResource item in collection.GetAllAsync(options)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -140,7 +139,7 @@ public async Task GetAll_ListPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/SweepJob/list.json // this example is just showing the usage of "Jobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,9 +159,8 @@ public async Task GetAll_ListSweepJob() MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); // invoke the operation and iterate over the result - string jobType = "string"; - string tag = "string"; - await foreach (MachineLearningJobResource item in collection.GetAllAsync(jobType: jobType, tag: tag)) + MachineLearningJobCollectionGetAllOptions options = new MachineLearningJobCollectionGetAllOptions() { JobType = "string", Tag = "string", ListViewType = MachineLearningListViewType.ActiveOnly, AssetName = "string", Scheduled = false, ScheduleId = "string" }; + await foreach (MachineLearningJobResource item in collection.GetAllAsync(options)) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -179,7 +177,7 @@ public async Task GetAll_ListSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +212,7 @@ public async Task Get_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +243,7 @@ public async Task Exists_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -288,7 +286,7 @@ public async Task GetIfExists_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -323,7 +321,7 @@ public async Task Get_GetCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -354,7 +352,7 @@ public async Task Exists_GetCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -397,7 +395,7 @@ public async Task GetIfExists_GetCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -432,7 +430,7 @@ public async Task Get_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -463,7 +461,7 @@ public async Task Exists_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -506,7 +504,7 @@ public async Task GetIfExists_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -541,7 +539,7 @@ public async Task Get_GetSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -572,7 +570,7 @@ public async Task Exists_GetSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -615,7 +613,7 @@ public async Task GetIfExists_GetSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/AutoMLJob/createOrUpdate.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -636,61 +634,87 @@ public async Task CreateOrUpdate_CreateOrUpdateAutoMLJob() // invoke the operation string id = "string"; - MachineLearningJobData data = new MachineLearningJobData(new AutoMLJob(new ImageClassification(new MachineLearningTableJobInput(new Uri("string")), new ImageLimitSettings() - { - MaxTrials = 2, - }) + MachineLearningJobData data = new MachineLearningJobData(new MachineLearningCommandJob("string", new ResourceIdentifier("string")) { - ModelSettings = new ImageModelSettingsClassification() + MlflowAutologger = MachineLearningFlowAutoLoggerState.Disabled, + CodeId = new ResourceIdentifier("string"), + Distribution = new TensorFlowDistributionConfiguration() { - ValidationCropSize = 2, + ParameterServerCount = 1, + WorkerCount = 1, }, - SearchSpace = -{ -new ImageModelDistributionSettingsClassification() -{ -ValidationCropSize = "choice(2, 360)", -} -}, - TargetColumnName = "string", - }) - { - EnvironmentId = "string", EnvironmentVariables = { ["string"] = "string", }, + Inputs = +{ +["string"] = new MachineLearningLiteralJobInput("string") +{ +Description = "string", +}, +}, + Limits = new MachineLearningCommandJobLimits() + { + Timeout = XmlConvert.ToTimeSpan("PT5M"), + }, Outputs = { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, +AssetName = "string", +AssetVersion = "string", +Mode = MachineLearningOutputDeliveryMode.Direct, Uri = new Uri("string"), Description = "string", }, }, + QueueSettings = new JobQueueSettings() + { + JobTier = JobTier.Premium, + Priority = 1, + }, Resources = new MachineLearningJobResourceConfiguration() { + DockerArgs = "string", + ShmSize = "2g", InstanceCount = 1, InstanceType = "string", + Locations = +{ +"string" +}, Properties = { ["string"] = BinaryData.FromObjectAsJson(new Dictionary() { -["9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad"] = null}), +["f69c8d5a-9b39-4183-92d3-a2b18944cf95"] = null}), }, }, + ComponentId = new ResourceIdentifier("string"), ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", Identity = new AmlToken(), IsArchived = false, + NotificationSetting = new NotificationSetting() + { + EmailOn = +{ +EmailNotificationEnableType.JobCompleted +}, + Emails = +{ +"string" +}, + }, Services = { ["string"] = new MachineLearningJobService() { Endpoint = "string", JobServiceType = "string", +Nodes = new JobAllNodes(), Port = 1, Properties = { @@ -723,7 +747,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/CommandJob/createOrUpdate.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -746,6 +770,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCommandJob() string id = "string"; MachineLearningJobData data = new MachineLearningJobData(new MachineLearningCommandJob("string", new ResourceIdentifier("string")) { + MlflowAutologger = MachineLearningFlowAutoLoggerState.Disabled, CodeId = new ResourceIdentifier("string"), Distribution = new TensorFlowDistributionConfiguration() { @@ -771,32 +796,59 @@ public async Task CreateOrUpdate_CreateOrUpdateCommandJob() { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, +AssetName = "string", +AssetVersion = "string", +Mode = MachineLearningOutputDeliveryMode.Upload, Uri = new Uri("string"), Description = "string", }, }, + QueueSettings = new JobQueueSettings() + { + JobTier = JobTier.Basic, + Priority = 1, + }, Resources = new MachineLearningJobResourceConfiguration() { + DockerArgs = "string", + ShmSize = "2g", InstanceCount = 1, InstanceType = "string", + Locations = +{ +"string" +}, Properties = { ["string"] = BinaryData.FromObjectAsJson(new Dictionary() { -["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), +["c9ac10d0-915b-4de5-afe8-a4c78a37a558"] = null}), }, }, + ComponentId = new ResourceIdentifier("string"), ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", Identity = new AmlToken(), + IsArchived = false, + NotificationSetting = new NotificationSetting() + { + EmailOn = +{ +EmailNotificationEnableType.JobCancelled +}, + Emails = +{ +"string" +}, + }, Services = { ["string"] = new MachineLearningJobService() { Endpoint = "string", JobServiceType = "string", +Nodes = new JobAllNodes(), Port = 1, Properties = { @@ -829,7 +881,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdatePipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/PipelineJob/createOrUpdate.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -912,7 +964,7 @@ public async Task CreateOrUpdate_CreateOrUpdatePipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/SweepJob/createOrUpdate.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -933,55 +985,87 @@ public async Task CreateOrUpdate_CreateOrUpdateSweepJob() // invoke the operation string id = "string"; - MachineLearningJobData data = new MachineLearningJobData(new MachineLearningSweepJob(new MachineLearningObjective(MachineLearningGoal.Minimize, "string"), new GridSamplingAlgorithm(), BinaryData.FromObjectAsJson(new Dictionary() - { - ["string"] = new Dictionary() - { - } - }), new MachineLearningTrialComponent("string", new ResourceIdentifier("string")) + MachineLearningJobData data = new MachineLearningJobData(new MachineLearningCommandJob("string", new ResourceIdentifier("string")) { + MlflowAutologger = MachineLearningFlowAutoLoggerState.Disabled, CodeId = new ResourceIdentifier("string"), - Distribution = new MpiDistributionConfiguration() + Distribution = new TensorFlowDistributionConfiguration() { - ProcessCountPerInstance = 1, + ParameterServerCount = 1, + WorkerCount = 1, }, EnvironmentVariables = { ["string"] = "string", }, + Inputs = +{ +["string"] = new MachineLearningLiteralJobInput("string") +{ +Description = "string", +}, +}, + Limits = new MachineLearningCommandJobLimits() + { + Timeout = XmlConvert.ToTimeSpan("PT5M"), + }, + Outputs = +{ +["string"] = new MachineLearningUriFileJobOutput() +{ +AssetName = "string", +AssetVersion = "string", +Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, +Uri = new Uri("string"), +Description = "string", +}, +}, + QueueSettings = new JobQueueSettings() + { + JobTier = JobTier.Basic, + Priority = 1, + }, Resources = new MachineLearningJobResourceConfiguration() { + DockerArgs = "string", + ShmSize = "2g", InstanceCount = 1, InstanceType = "string", + Locations = +{ +"string" +}, Properties = { ["string"] = BinaryData.FromObjectAsJson(new Dictionary() { -["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), +["5fc1f627-491e-45a0-a6a2-f5b4be884911"] = null}), }, }, - }) - { - EarlyTermination = new MedianStoppingPolicy() - { - DelayEvaluation = 1, - EvaluationInterval = 1, - }, - Limits = new MachineLearningSweepJobLimits() - { - MaxConcurrentTrials = 1, - MaxTotalTrials = 1, - TrialTimeout = XmlConvert.ToTimeSpan("PT1S"), - }, + ComponentId = new ResourceIdentifier("string"), ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", + Identity = new AmlToken(), + IsArchived = false, + NotificationSetting = new NotificationSetting() + { + EmailOn = +{ +EmailNotificationEnableType.JobCompleted +}, + Emails = +{ +"string" +}, + }, Services = { ["string"] = new MachineLearningJobService() { Endpoint = "string", JobServiceType = "string", +Nodes = new JobAllNodes(), Port = 1, Properties = { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs index 9f0528611c3d7..875cae188f480 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs @@ -6,9 +6,7 @@ #nullable disable using System; -using System.Collections.Generic; using System.Threading.Tasks; -using System.Xml; using Azure; using Azure.Core; using Azure.Identity; @@ -25,7 +23,7 @@ public partial class Sample_MachineLearningJobResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/delete.json // this example is just showing the usage of "Jobs_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +51,7 @@ public async Task Delete_DeleteJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +83,7 @@ public async Task Get_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +115,7 @@ public async Task Get_GetCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +147,7 @@ public async Task Get_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,13 +174,13 @@ public async Task Get_GetSweepJob() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate AutoML Job. + // Update Job. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateAutoMLJob() + public async Task Update_UpdateJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/createOrUpdate.json - // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/update.json + // this example is just showing the usage of "Jobs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -199,362 +197,17 @@ public async Task Update_CreateOrUpdateAutoMLJob() MachineLearningJobResource machineLearningJob = client.GetMachineLearningJobResource(machineLearningJobResourceId); // invoke the operation - MachineLearningJobData data = new MachineLearningJobData(new AutoMLJob(new ImageClassification(new MachineLearningTableJobInput(new Uri("string")), new ImageLimitSettings() + MachineLearningJobPatch patch = new MachineLearningJobPatch() { - MaxTrials = 2, - }) - { - ModelSettings = new ImageModelSettingsClassification() - { - ValidationCropSize = 2, - }, - SearchSpace = -{ -new ImageModelDistributionSettingsClassification() -{ -ValidationCropSize = "choice(2, 360)", -} -}, - TargetColumnName = "string", - }) - { - EnvironmentId = "string", - EnvironmentVariables = -{ -["string"] = "string", -}, - Outputs = -{ -["string"] = new MachineLearningUriFileJobOutput() -{ -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, -Uri = new Uri("string"), -Description = "string", -}, -}, - Resources = new MachineLearningJobResourceConfiguration() - { - InstanceCount = 1, - InstanceType = "string", - Properties = -{ -["string"] = BinaryData.FromObjectAsJson(new Dictionary() -{ -["9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad"] = null}), -}, - }, - ComputeId = new ResourceIdentifier("string"), - DisplayName = "string", - ExperimentName = "string", - Identity = new AmlToken(), - IsArchived = false, - Services = -{ -["string"] = new MachineLearningJobService() -{ -Endpoint = "string", -JobServiceType = "string", -Port = 1, -Properties = -{ -["string"] = "string", -}, -}, -}, - Description = "string", - Properties = -{ -["string"] = "string", -}, - Tags = -{ -["string"] = "string", -}, - }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); - MachineLearningJobResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // CreateOrUpdate Command Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateCommandJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/createOrUpdate.json - // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningJobResource created on azure - // for more information of creating MachineLearningJobResource, please refer to the document of MachineLearningJobResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - string id = "string"; - ResourceIdentifier machineLearningJobResourceId = MachineLearningJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); - MachineLearningJobResource machineLearningJob = client.GetMachineLearningJobResource(machineLearningJobResourceId); - - // invoke the operation - MachineLearningJobData data = new MachineLearningJobData(new MachineLearningCommandJob("string", new ResourceIdentifier("string")) - { - CodeId = new ResourceIdentifier("string"), - Distribution = new TensorFlowDistributionConfiguration() - { - ParameterServerCount = 1, - WorkerCount = 1, - }, - EnvironmentVariables = -{ -["string"] = "string", -}, - Inputs = -{ -["string"] = new MachineLearningLiteralJobInput("string") -{ -Description = "string", -}, -}, - Limits = new MachineLearningCommandJobLimits() - { - Timeout = XmlConvert.ToTimeSpan("PT5M"), - }, - Outputs = + NotificationSettingWebhooks = { -["string"] = new MachineLearningUriFileJobOutput() +["string"] = new AzureDevOpsWebhook() { -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, -Uri = new Uri("string"), -Description = "string", -}, +EventType = "string", }, - Resources = new MachineLearningJobResourceConfiguration() - { - InstanceCount = 1, - InstanceType = "string", - Properties = -{ -["string"] = BinaryData.FromObjectAsJson(new Dictionary() -{ -["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), -}, - }, - ComputeId = new ResourceIdentifier("string"), - DisplayName = "string", - ExperimentName = "string", - Identity = new AmlToken(), - Services = -{ -["string"] = new MachineLearningJobService() -{ -Endpoint = "string", -JobServiceType = "string", -Port = 1, -Properties = -{ -["string"] = "string", -}, -}, -}, - Description = "string", - Properties = -{ -["string"] = "string", -}, - Tags = -{ -["string"] = "string", -}, - }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); - MachineLearningJobResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // CreateOrUpdate Pipeline Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdatePipelineJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json - // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningJobResource created on azure - // for more information of creating MachineLearningJobResource, please refer to the document of MachineLearningJobResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - string id = "string"; - ResourceIdentifier machineLearningJobResourceId = MachineLearningJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); - MachineLearningJobResource machineLearningJob = client.GetMachineLearningJobResource(machineLearningJobResourceId); - - // invoke the operation - MachineLearningJobData data = new MachineLearningJobData(new MachineLearningPipelineJob() - { - Inputs = -{ -["string"] = new MachineLearningLiteralJobInput("string") -{ -Description = "string", -}, -}, - Outputs = -{ -["string"] = new MachineLearningUriFileJobOutput() -{ -Mode = MachineLearningOutputDeliveryMode.Upload, -Uri = new Uri("string"), -Description = "string", -}, -}, - Settings = BinaryData.FromObjectAsJson(new Dictionary() - { - }), - ComputeId = new ResourceIdentifier("string"), - DisplayName = "string", - ExperimentName = "string", - Services = -{ -["string"] = new MachineLearningJobService() -{ -Endpoint = "string", -JobServiceType = "string", -Port = 1, -Properties = -{ -["string"] = "string", -}, -}, -}, - Description = "string", - Properties = -{ -["string"] = "string", -}, - Tags = -{ -["string"] = "string", -}, - }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); - MachineLearningJobResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // CreateOrUpdate Sweep Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateSweepJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/createOrUpdate.json - // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningJobResource created on azure - // for more information of creating MachineLearningJobResource, please refer to the document of MachineLearningJobResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - string id = "string"; - ResourceIdentifier machineLearningJobResourceId = MachineLearningJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); - MachineLearningJobResource machineLearningJob = client.GetMachineLearningJobResource(machineLearningJobResourceId); - - // invoke the operation - MachineLearningJobData data = new MachineLearningJobData(new MachineLearningSweepJob(new MachineLearningObjective(MachineLearningGoal.Minimize, "string"), new GridSamplingAlgorithm(), BinaryData.FromObjectAsJson(new Dictionary() - { - ["string"] = new Dictionary() - { - } - }), new MachineLearningTrialComponent("string", new ResourceIdentifier("string")) - { - CodeId = new ResourceIdentifier("string"), - Distribution = new MpiDistributionConfiguration() - { - ProcessCountPerInstance = 1, - }, - EnvironmentVariables = -{ -["string"] = "string", -}, - Resources = new MachineLearningJobResourceConfiguration() - { - InstanceCount = 1, - InstanceType = "string", - Properties = -{ -["string"] = BinaryData.FromObjectAsJson(new Dictionary() -{ -["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), -}, - }, - }) - { - EarlyTermination = new MedianStoppingPolicy() - { - DelayEvaluation = 1, - EvaluationInterval = 1, - }, - Limits = new MachineLearningSweepJobLimits() - { - MaxConcurrentTrials = 1, - MaxTotalTrials = 1, - TrialTimeout = XmlConvert.ToTimeSpan("PT1S"), - }, - ComputeId = new ResourceIdentifier("string"), - DisplayName = "string", - ExperimentName = "string", - Services = -{ -["string"] = new MachineLearningJobService() -{ -Endpoint = "string", -JobServiceType = "string", -Port = 1, -Properties = -{ -["string"] = "string", -}, -}, -}, - Description = "string", - Properties = -{ -["string"] = "string", -}, - Tags = -{ -["string"] = "string", }, - }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); - MachineLearningJobResource result = lro.Value; + }; + MachineLearningJobResource result = await machineLearningJob.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -568,7 +221,7 @@ public async Task Update_CreateOrUpdateSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Cancel_CancelJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/cancel.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Job/cancel.json // this example is just showing the usage of "Jobs_Cancel" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobCollection.cs new file mode 100644 index 0000000000000..8cf965d0ed957 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobCollection.cs @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningLabelingJobCollection + { + // List Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/list.json + // this example is just showing the usage of "LabelingJobs_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningLabelingJobResource + MachineLearningLabelingJobCollection collection = machineLearningWorkspace.GetMachineLearningLabelingJobs(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningLabelingJobResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningLabelingJobData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/get.json + // this example is just showing the usage of "LabelingJobs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningLabelingJobResource + MachineLearningLabelingJobCollection collection = machineLearningWorkspace.GetMachineLearningLabelingJobs(); + + // invoke the operation + string id = "testLabelingJob"; + bool? includeJobInstructions = true; + bool? includeLabelCategories = true; + MachineLearningLabelingJobResource result = await collection.GetAsync(id, includeJobInstructions: includeJobInstructions, includeLabelCategories: includeLabelCategories); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningLabelingJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/get.json + // this example is just showing the usage of "LabelingJobs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningLabelingJobResource + MachineLearningLabelingJobCollection collection = machineLearningWorkspace.GetMachineLearningLabelingJobs(); + + // invoke the operation + string id = "testLabelingJob"; + bool? includeJobInstructions = true; + bool? includeLabelCategories = true; + bool result = await collection.ExistsAsync(id, includeJobInstructions: includeJobInstructions, includeLabelCategories: includeLabelCategories); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/get.json + // this example is just showing the usage of "LabelingJobs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningLabelingJobResource + MachineLearningLabelingJobCollection collection = machineLearningWorkspace.GetMachineLearningLabelingJobs(); + + // invoke the operation + string id = "testLabelingJob"; + bool? includeJobInstructions = true; + bool? includeLabelCategories = true; + NullableResponse response = await collection.GetIfExistsAsync(id, includeJobInstructions: includeJobInstructions, includeLabelCategories: includeLabelCategories); + MachineLearningLabelingJobResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningLabelingJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/createOrUpdate.json + // this example is just showing the usage of "LabelingJobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningLabelingJobResource + MachineLearningLabelingJobCollection collection = machineLearningWorkspace.GetMachineLearningLabelingJobs(); + + // invoke the operation + string id = "testLabelingJob"; + MachineLearningLabelingJobData data = new MachineLearningLabelingJobData(new LabelingJobProperties() + { + JobInstructionsUri = new Uri("link/to/instructions"), + LabelCategories = +{ +["myCategory1"] = new LabelCategory() +{ +Classes = +{ +["myLabelClass1"] = new LabelClass() +{ +DisplayName = "myLabelClass1", +Subclasses = +{ +}, +}, +["myLabelClass2"] = new LabelClass() +{ +DisplayName = "myLabelClass2", +Subclasses = +{ +}, +}, +}, +DisplayName = "myCategory1Title", +MultiSelect = LabelCategoryMultiSelect.Disabled, +}, +["myCategory2"] = new LabelCategory() +{ +Classes = +{ +["myLabelClass1"] = new LabelClass() +{ +DisplayName = "myLabelClass1", +Subclasses = +{ +}, +}, +["myLabelClass2"] = new LabelClass() +{ +DisplayName = "myLabelClass2", +Subclasses = +{ +}, +}, +}, +DisplayName = "myCategory2Title", +MultiSelect = LabelCategoryMultiSelect.Disabled, +}, +}, + LabelingJobMediaProperties = new LabelingJobImageProperties(), + MlAssistConfiguration = new MachineLearningAssistEnabledConfiguration("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute"), + Description = "string", + Properties = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + Tags = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, id, data); + MachineLearningLabelingJobResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningLabelingJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobResource.cs new file mode 100644 index 0000000000000..4aceca2b4305b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningLabelingJobResource.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningLabelingJobResource + { + // Delete Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/delete.json + // this example is just showing the usage of "LabelingJobs_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningLabelingJobResource created on azure + // for more information of creating MachineLearningLabelingJobResource, please refer to the document of MachineLearningLabelingJobResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + string id = "testLabelingJob"; + ResourceIdentifier machineLearningLabelingJobResourceId = MachineLearningLabelingJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); + MachineLearningLabelingJobResource machineLearningLabelingJob = client.GetMachineLearningLabelingJobResource(machineLearningLabelingJobResourceId); + + // invoke the operation + await machineLearningLabelingJob.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/get.json + // this example is just showing the usage of "LabelingJobs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningLabelingJobResource created on azure + // for more information of creating MachineLearningLabelingJobResource, please refer to the document of MachineLearningLabelingJobResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + string id = "testLabelingJob"; + ResourceIdentifier machineLearningLabelingJobResourceId = MachineLearningLabelingJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); + MachineLearningLabelingJobResource machineLearningLabelingJob = client.GetMachineLearningLabelingJobResource(machineLearningLabelingJobResourceId); + + // invoke the operation + bool? includeJobInstructions = true; + bool? includeLabelCategories = true; + MachineLearningLabelingJobResource result = await machineLearningLabelingJob.GetAsync(includeJobInstructions: includeJobInstructions, includeLabelCategories: includeLabelCategories); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningLabelingJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/createOrUpdate.json + // this example is just showing the usage of "LabelingJobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningLabelingJobResource created on azure + // for more information of creating MachineLearningLabelingJobResource, please refer to the document of MachineLearningLabelingJobResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + string id = "testLabelingJob"; + ResourceIdentifier machineLearningLabelingJobResourceId = MachineLearningLabelingJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); + MachineLearningLabelingJobResource machineLearningLabelingJob = client.GetMachineLearningLabelingJobResource(machineLearningLabelingJobResourceId); + + // invoke the operation + MachineLearningLabelingJobData data = new MachineLearningLabelingJobData(new LabelingJobProperties() + { + JobInstructionsUri = new Uri("link/to/instructions"), + LabelCategories = +{ +["myCategory1"] = new LabelCategory() +{ +Classes = +{ +["myLabelClass1"] = new LabelClass() +{ +DisplayName = "myLabelClass1", +Subclasses = +{ +}, +}, +["myLabelClass2"] = new LabelClass() +{ +DisplayName = "myLabelClass2", +Subclasses = +{ +}, +}, +}, +DisplayName = "myCategory1Title", +MultiSelect = LabelCategoryMultiSelect.Disabled, +}, +["myCategory2"] = new LabelCategory() +{ +Classes = +{ +["myLabelClass1"] = new LabelClass() +{ +DisplayName = "myLabelClass1", +Subclasses = +{ +}, +}, +["myLabelClass2"] = new LabelClass() +{ +DisplayName = "myLabelClass2", +Subclasses = +{ +}, +}, +}, +DisplayName = "myCategory2Title", +MultiSelect = LabelCategoryMultiSelect.Disabled, +}, +}, + LabelingJobMediaProperties = new LabelingJobImageProperties(), + MlAssistConfiguration = new MachineLearningAssistEnabledConfiguration("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute"), + Description = "string", + Properties = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + Tags = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + }); + ArmOperation lro = await machineLearningLabelingJob.UpdateAsync(WaitUntil.Completed, data); + MachineLearningLabelingJobResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningLabelingJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ExportLabels Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ExportLabels_ExportLabelsLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/exportLabels.json + // this example is just showing the usage of "LabelingJobs_ExportLabels" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningLabelingJobResource created on azure + // for more information of creating MachineLearningLabelingJobResource, please refer to the document of MachineLearningLabelingJobResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + string id = "testLabelingJob"; + ResourceIdentifier machineLearningLabelingJobResourceId = MachineLearningLabelingJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); + MachineLearningLabelingJobResource machineLearningLabelingJob = client.GetMachineLearningLabelingJobResource(machineLearningLabelingJobResourceId); + + // invoke the operation + ExportSummary body = new DatasetExportSummary(); + ArmOperation lro = await machineLearningLabelingJob.ExportLabelsAsync(WaitUntil.Completed, body); + ExportSummary result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // Pause Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Pause_PauseLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/pause.json + // this example is just showing the usage of "LabelingJobs_Pause" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningLabelingJobResource created on azure + // for more information of creating MachineLearningLabelingJobResource, please refer to the document of MachineLearningLabelingJobResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + string id = "testLabelingJob"; + ResourceIdentifier machineLearningLabelingJobResourceId = MachineLearningLabelingJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); + MachineLearningLabelingJobResource machineLearningLabelingJob = client.GetMachineLearningLabelingJobResource(machineLearningLabelingJobResourceId); + + // invoke the operation + await machineLearningLabelingJob.PauseAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Resume Labeling Job. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Resume_ResumeLabelingJob() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/LabelingJob/resume.json + // this example is just showing the usage of "LabelingJobs_Resume" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningLabelingJobResource created on azure + // for more information of creating MachineLearningLabelingJobResource, please refer to the document of MachineLearningLabelingJobResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + string id = "testLabelingJob"; + ResourceIdentifier machineLearningLabelingJobResourceId = MachineLearningLabelingJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); + MachineLearningLabelingJobResource machineLearningLabelingJob = client.GetMachineLearningLabelingJobResource(machineLearningLabelingJobResourceId); + + // invoke the operation + await machineLearningLabelingJob.ResumeAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs index ba6e21d05fce4..63fbb3224d4b5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningModelContainerCollection { - // List Model Container. + // List Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListModelContainer() + public async Task GetAll_ListWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/list.json // this example is just showing the usage of "ModelContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,12 +55,12 @@ public async Task GetAll_ListModelContainer() Console.WriteLine($"Succeeded"); } - // Get Model Container. + // Get Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetModelContainer() + public async Task Get_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,12 +90,12 @@ public async Task Get_GetModelContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Model Container. + // Get Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetModelContainer() + public async Task Exists_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,12 +121,12 @@ public async Task Exists_GetModelContainer() Console.WriteLine($"Succeeded: {result}"); } - // Get Model Container. + // Get Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetModelContainer() + public async Task GetIfExists_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,12 +164,12 @@ public async Task GetIfExists_GetModelContainer() } } - // CreateOrUpdate Model Container. + // CreateOrUpdate Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateModelContainer() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/createOrUpdate.json // this example is just showing the usage of "ModelContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs index dd68013c5d5aa..d379dc04e308e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningModelContainerResource { - // Delete Model Container. + // Delete Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteModelContainer() + public async Task Delete_DeleteWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/delete.json // this example is just showing the usage of "ModelContainers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,12 +46,12 @@ public async Task Delete_DeleteModelContainer() Console.WriteLine($"Succeeded"); } - // Get Model Container. + // Get Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetModelContainer() + public async Task Get_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,12 +78,12 @@ public async Task Get_GetModelContainer() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Model Container. + // CreateOrUpdate Workspace Model Container. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateModelContainer() + public async Task Update_CreateOrUpdateWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelContainer/createOrUpdate.json // this example is just showing the usage of "ModelContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs index 246d72911cdfd..30dbc0e20c58a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningModelVersionCollection { - // List Model Version. + // List Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListModelVersion() + public async Task GetAll_ListWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/list.json // this example is just showing the usage of "ModelVersions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,12 +57,12 @@ public async Task GetAll_ListModelVersion() Console.WriteLine($"Succeeded"); } - // Get Model Version. + // Get Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetModelVersion() + public async Task Get_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,12 +93,12 @@ public async Task Get_GetModelVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Model Version. + // Get Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetModelVersion() + public async Task Exists_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,12 +125,12 @@ public async Task Exists_GetModelVersion() Console.WriteLine($"Succeeded: {result}"); } - // Get Model Version. + // Get Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetModelVersion() + public async Task GetIfExists_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,12 +169,12 @@ public async Task GetIfExists_GetModelVersion() } } - // CreateOrUpdate Model Version. + // CreateOrUpdate Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateModelVersion() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/createOrUpdate.json // this example is just showing the usage of "ModelVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs index bbaa5cdd3060d..31ac7bd9562e3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningModelVersionResource { - // Delete Model Version. + // Delete Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteModelVersion() + public async Task Delete_DeleteWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/delete.json // this example is just showing the usage of "ModelVersions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,12 +47,12 @@ public async Task Delete_DeleteModelVersion() Console.WriteLine($"Succeeded"); } - // Get Model Version. + // Get Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetModelVersion() + public async Task Get_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,12 +80,12 @@ public async Task Get_GetModelVersion() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate Model Version. + // CreateOrUpdate Workspace Model Version. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateModelVersion() + public async Task Update_CreateOrUpdateWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ModelVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/createOrUpdate.json // this example is just showing the usage of "ModelVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,5 +138,69 @@ public async Task Update_CreateOrUpdateModelVersion() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Package Workspace Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Package_PackageWorkspaceModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/ModelVersion/package.json + // this example is just showing the usage of "ModelVersions_Package" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningModelVersionResource created on azure + // for more information of creating MachineLearningModelVersionResource, please refer to the document of MachineLearningModelVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "my-aml-workspace"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningModelVersionResourceId = MachineLearningModelVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, name, version); + MachineLearningModelVersionResource machineLearningModelVersion = client.GetMachineLearningModelVersionResource(machineLearningModelVersionResourceId); + + // invoke the operation + ModelPackageContent content = new ModelPackageContent(new AzureMLBatchInferencingServer() + { + CodeConfiguration = new MachineLearningCodeConfiguration("string") + { + CodeId = new ResourceIdentifier("string"), + }, + }, "string") + { + BaseEnvironmentSource = new BaseEnvironmentType(new ResourceIdentifier("string")), + EnvironmentVariables = +{ +["string"] = "string", +}, + Inputs = +{ +new ModelPackageInput(PackageInputType.UriFile,new PackageInputPathUri() +{ +Uri = new Uri("string"), +}) +{ +Mode = PackageInputDeliveryMode.Download, +MountPath = "string", +} +}, + ModelConfiguration = new ModelConfiguration() + { + Mode = new PackageInputDeliveryMode("ReadOnlyMount"), + MountPath = "string", + }, + Tags = +{ +["string"] = "string", +}, + }; + ArmOperation lro = await machineLearningModelVersion.PackageAsync(WaitUntil.Completed, content); + ModelPackageResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs index d4f4f570c778e..47e00a183d751 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs @@ -25,7 +25,7 @@ public partial class Sample_MachineLearningOnlineDeploymentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListOnlineDeployments() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/list.json // this example is just showing the usage of "OnlineDeployments_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task GetAll_ListOnlineDeployments() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task Exists_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task GetIfExists_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task Get_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +245,7 @@ public async Task Exists_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -289,7 +289,7 @@ public async Task GetIfExists_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json // this example is just showing the usage of "OnlineDeployments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -397,7 +397,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json // this example is just showing the usage of "OnlineDeployments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs index 612cd5386de94..f322ac2a17772 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs @@ -18,12 +18,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningOnlineDeploymentResource { - // Delete Online Deployment. + // Delete Workspace Online Deployment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteOnlineDeployment() + public async Task Delete_DeleteWorkspaceOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineDeployment/delete.json // this example is just showing the usage of "OnlineDeployments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Delete_DeleteOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Get_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Get_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json // this example is just showing the usage of "OnlineDeployments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task Update_UpdateKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json // this example is just showing the usage of "OnlineDeployments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +214,7 @@ public async Task Update_UpdateManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLogs_GetOnlineDeploymentLogs() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/getLogs.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/getLogs.json // this example is just showing the usage of "OnlineDeployments_GetLogs" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -248,7 +248,7 @@ public async Task GetLogs_GetOnlineDeploymentLogs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkus_ListKubernetesOnlineDeploymentSkus() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json // this example is just showing the usage of "OnlineDeployments_ListSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -281,7 +281,7 @@ public async Task GetSkus_ListKubernetesOnlineDeploymentSkus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkus_ListManagedOnlineDeploymentSkus() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json // this example is just showing the usage of "OnlineDeployments_ListSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs index 7a27ea28177bf..e6fbd345a8b9e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs @@ -19,12 +19,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningOnlineEndpointCollection { - // List Online Endpoint. + // List Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListOnlineEndpoint() + public async Task GetAll_ListWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/list.json // this example is just showing the usage of "OnlineEndpoints_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,12 +57,12 @@ public async Task GetAll_ListOnlineEndpoint() Console.WriteLine($"Succeeded"); } - // Get Online Endpoint. + // Get Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetOnlineEndpoint() + public async Task Get_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,12 +92,12 @@ public async Task Get_GetOnlineEndpoint() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Get Online Endpoint. + // Get Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetOnlineEndpoint() + public async Task Exists_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,12 +123,12 @@ public async Task Exists_GetOnlineEndpoint() Console.WriteLine($"Succeeded: {result}"); } - // Get Online Endpoint. + // Get Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetOnlineEndpoint() + public async Task GetIfExists_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,12 +166,12 @@ public async Task GetIfExists_GetOnlineEndpoint() } } - // CreateOrUpdate Online Endpoint. + // CreateOrUpdate Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateOnlineEndpoint() + public async Task CreateOrUpdate_CreateOrUpdateWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/createOrUpdate.json // this example is just showing the usage of "OnlineEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs index d9080f02bb965..91d464bb1450d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs @@ -19,12 +19,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningOnlineEndpointResource { - // Delete Online Endpoint. + // Delete Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteOnlineEndpoint() + public async Task Delete_DeleteWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/delete.json // this example is just showing the usage of "OnlineEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,12 +47,12 @@ public async Task Delete_DeleteOnlineEndpoint() Console.WriteLine($"Succeeded"); } - // Get Online Endpoint. + // Get Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetOnlineEndpoint() + public async Task Get_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,12 +79,12 @@ public async Task Get_GetOnlineEndpoint() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Update Online Endpoint. + // Update Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateOnlineEndpoint() + public async Task Update_UpdateWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/update.json // this example is just showing the usage of "OnlineEndpoints_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,12 +128,12 @@ public async Task Update_UpdateOnlineEndpoint() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // ListKeys Online Endpoint. + // ListKeys Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetKeys_ListKeysOnlineEndpoint() + public async Task GetKeys_ListKeysWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/listKeys.json // this example is just showing the usage of "OnlineEndpoints_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,12 +156,12 @@ public async Task GetKeys_ListKeysOnlineEndpoint() Console.WriteLine($"Succeeded: {result}"); } - // RegenerateKeys Online Endpoint. + // RegenerateKeys Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task RegenerateKeys_RegenerateKeysOnlineEndpoint() + public async Task RegenerateKeys_RegenerateKeysWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/regenerateKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/regenerateKeys.json // this example is just showing the usage of "OnlineEndpoints_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -188,12 +188,12 @@ public async Task RegenerateKeys_RegenerateKeysOnlineEndpoint() Console.WriteLine($"Succeeded"); } - // GetToken Online Endpoint. + // GetToken Workspace Online Endpoint. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetToken_GetTokenOnlineEndpoint() + public async Task GetToken_GetTokenWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/getToken.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/OnlineEndpoint/getToken.json // this example is just showing the usage of "OnlineEndpoints_GetToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs new file mode 100644 index 0000000000000..149d13d581d04 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningOutboundRuleBasicCollection + { + // List ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/listRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningOutboundRuleBasicResource + MachineLearningOutboundRuleBasicCollection collection = machineLearningWorkspace.GetMachineLearningOutboundRuleBasics(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningOutboundRuleBasicResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningOutboundRuleBasicData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/getRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningOutboundRuleBasicResource + MachineLearningOutboundRuleBasicCollection collection = machineLearningWorkspace.GetMachineLearningOutboundRuleBasics(); + + // invoke the operation + string ruleName = "some_string"; + MachineLearningOutboundRuleBasicResource result = await collection.GetAsync(ruleName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningOutboundRuleBasicData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/getRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningOutboundRuleBasicResource + MachineLearningOutboundRuleBasicCollection collection = machineLearningWorkspace.GetMachineLearningOutboundRuleBasics(); + + // invoke the operation + string ruleName = "some_string"; + bool result = await collection.ExistsAsync(ruleName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/getRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningOutboundRuleBasicResource + MachineLearningOutboundRuleBasicCollection collection = machineLearningWorkspace.GetMachineLearningOutboundRuleBasics(); + + // invoke the operation + string ruleName = "some_string"; + NullableResponse response = await collection.GetIfExistsAsync(ruleName); + MachineLearningOutboundRuleBasicResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningOutboundRuleBasicData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/createOrUpdateRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // get the collection of this MachineLearningOutboundRuleBasicResource + MachineLearningOutboundRuleBasicCollection collection = machineLearningWorkspace.GetMachineLearningOutboundRuleBasics(); + + // invoke the operation + string ruleName = "some_string"; + MachineLearningOutboundRuleBasicData data = new MachineLearningOutboundRuleBasicData(new FqdnOutboundRule() + { + Destination = "some_string", + Category = OutboundRuleCategory.UserDefined, + Status = OutboundRuleStatus.Active, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ruleName, data); + MachineLearningOutboundRuleBasicResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningOutboundRuleBasicData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs new file mode 100644 index 0000000000000..b0b72162bd6ad --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningOutboundRuleBasicResource + { + // Delete ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/deleteRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningOutboundRuleBasicResource created on azure + // for more information of creating MachineLearningOutboundRuleBasicResource, please refer to the document of MachineLearningOutboundRuleBasicResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + string ruleName = "some_string"; + ResourceIdentifier machineLearningOutboundRuleBasicResourceId = MachineLearningOutboundRuleBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, ruleName); + MachineLearningOutboundRuleBasicResource machineLearningOutboundRuleBasic = client.GetMachineLearningOutboundRuleBasicResource(machineLearningOutboundRuleBasicResourceId); + + // invoke the operation + await machineLearningOutboundRuleBasic.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/getRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningOutboundRuleBasicResource created on azure + // for more information of creating MachineLearningOutboundRuleBasicResource, please refer to the document of MachineLearningOutboundRuleBasicResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + string ruleName = "some_string"; + ResourceIdentifier machineLearningOutboundRuleBasicResourceId = MachineLearningOutboundRuleBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, ruleName); + MachineLearningOutboundRuleBasicResource machineLearningOutboundRuleBasic = client.GetMachineLearningOutboundRuleBasicResource(machineLearningOutboundRuleBasicResourceId); + + // invoke the operation + MachineLearningOutboundRuleBasicResource result = await machineLearningOutboundRuleBasic.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningOutboundRuleBasicData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate ManagedNetworkSettingsRule + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateManagedNetworkSettingsRule() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/createOrUpdateRule.json + // this example is just showing the usage of "ManagedNetworkSettingsRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningOutboundRuleBasicResource created on azure + // for more information of creating MachineLearningOutboundRuleBasicResource, please refer to the document of MachineLearningOutboundRuleBasicResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + string ruleName = "some_string"; + ResourceIdentifier machineLearningOutboundRuleBasicResourceId = MachineLearningOutboundRuleBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, ruleName); + MachineLearningOutboundRuleBasicResource machineLearningOutboundRuleBasic = client.GetMachineLearningOutboundRuleBasicResource(machineLearningOutboundRuleBasicResourceId); + + // invoke the operation + MachineLearningOutboundRuleBasicData data = new MachineLearningOutboundRuleBasicData(new FqdnOutboundRule() + { + Destination = "some_string", + Category = OutboundRuleCategory.UserDefined, + Status = OutboundRuleStatus.Active, + }); + ArmOperation lro = await machineLearningOutboundRuleBasic.UpdateAsync(WaitUntil.Completed, data); + MachineLearningOutboundRuleBasicResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningOutboundRuleBasicData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs index e0b98c7768736..80fcca87269ad 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_MachineLearningPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_StorageAccountListPrivateEndpointConnections() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/list.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_StorageAccountListPrivateEndpointConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_WorkspaceGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_WorkspaceGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_WorkspaceGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_WorkspacePutPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,8 +194,8 @@ public async Task CreateOrUpdate_WorkspacePutPrivateEndpointConnection() { ConnectionState = new MachineLearningPrivateLinkServiceConnectionState() { - Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, Description = "Auto-Approved", + Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs index 8207fbc299e4f..82a3a4d5f9993 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs @@ -18,13 +18,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningPrivateEndpointConnectionResource { - // WorkspaceGetPrivateEndpointConnection + // WorkspacePutPrivateEndpointConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_WorkspaceGetPrivateEndpointConnection() + public async Task Delete_WorkspacePutPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/delete.json + // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,22 +41,18 @@ public async Task Get_WorkspaceGetPrivateEndpointConnection() MachineLearningPrivateEndpointConnectionResource machineLearningPrivateEndpointConnection = client.GetMachineLearningPrivateEndpointConnectionResource(machineLearningPrivateEndpointConnectionResourceId); // invoke the operation - MachineLearningPrivateEndpointConnectionResource result = await machineLearningPrivateEndpointConnection.GetAsync(); + await machineLearningPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningPrivateEndpointConnectionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded"); } - // WorkspacePutPrivateEndpointConnection + // WorkspaceGetPrivateEndpointConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_WorkspacePutPrivateEndpointConnection() + public async Task Get_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/createOrUpdate.json - // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/get.json + // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -73,16 +69,7 @@ public async Task Update_WorkspacePutPrivateEndpointConnection() MachineLearningPrivateEndpointConnectionResource machineLearningPrivateEndpointConnection = client.GetMachineLearningPrivateEndpointConnectionResource(machineLearningPrivateEndpointConnectionResourceId); // invoke the operation - MachineLearningPrivateEndpointConnectionData data = new MachineLearningPrivateEndpointConnectionData(new AzureLocation("placeholder")) - { - ConnectionState = new MachineLearningPrivateLinkServiceConnectionState() - { - Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, - Description = "Auto-Approved", - }, - }; - ArmOperation lro = await machineLearningPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); - MachineLearningPrivateEndpointConnectionResource result = lro.Value; + MachineLearningPrivateEndpointConnectionResource result = await machineLearningPrivateEndpointConnection.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -91,13 +78,13 @@ public async Task Update_WorkspacePutPrivateEndpointConnection() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // WorkspaceDeletePrivateEndpointConnection + // WorkspacePutPrivateEndpointConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_WorkspaceDeletePrivateEndpointConnection() + public async Task Update_WorkspacePutPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/delete.json - // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json + // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -114,9 +101,22 @@ public async Task Delete_WorkspaceDeletePrivateEndpointConnection() MachineLearningPrivateEndpointConnectionResource machineLearningPrivateEndpointConnection = client.GetMachineLearningPrivateEndpointConnectionResource(machineLearningPrivateEndpointConnectionResourceId); // invoke the operation - await machineLearningPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); + MachineLearningPrivateEndpointConnectionData data = new MachineLearningPrivateEndpointConnectionData(new AzureLocation("placeholder")) + { + ConnectionState = new MachineLearningPrivateLinkServiceConnectionState() + { + Description = "Auto-Approved", + Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, + }, + }; + ArmOperation lro = await machineLearningPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); + MachineLearningPrivateEndpointConnectionResource result = lro.Value; - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs new file mode 100644 index 0000000000000..e2132cbc92f5c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryCodeContainerCollection + { + // List Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/list.json + // this example is just showing the usage of "RegistryCodeContainers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryCodeContainerResource + MachineLearningRegistryCodeContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryCodeContainers(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningRegistryCodeContainerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeContainerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/get.json + // this example is just showing the usage of "RegistryCodeContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryCodeContainerResource + MachineLearningRegistryCodeContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryCodeContainers(); + + // invoke the operation + string codeName = "testContainer"; + MachineLearningRegistryCodeContainerResource result = await collection.GetAsync(codeName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/get.json + // this example is just showing the usage of "RegistryCodeContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryCodeContainerResource + MachineLearningRegistryCodeContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryCodeContainers(); + + // invoke the operation + string codeName = "testContainer"; + bool result = await collection.ExistsAsync(codeName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/get.json + // this example is just showing the usage of "RegistryCodeContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryCodeContainerResource + MachineLearningRegistryCodeContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryCodeContainers(); + + // invoke the operation + string codeName = "testContainer"; + NullableResponse response = await collection.GetIfExistsAsync(codeName); + MachineLearningRegistryCodeContainerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryCodeContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryCodeContainerResource + MachineLearningRegistryCodeContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryCodeContainers(); + + // invoke the operation + string codeName = "testContainer"; + MachineLearningCodeContainerData data = new MachineLearningCodeContainerData(new MachineLearningCodeContainerProperties() + { + Description = "string", + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, codeName, data); + MachineLearningRegistryCodeContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs new file mode 100644 index 0000000000000..42707b5446890 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryCodeContainerResource + { + // Delete Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/delete.json + // this example is just showing the usage of "RegistryCodeContainers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + string codeName = "testContainer"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // invoke the operation + await machineLearningRegistryCodeContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/get.json + // this example is just showing the usage of "RegistryCodeContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + string codeName = "testContainer"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // invoke the operation + MachineLearningRegistryCodeContainerResource result = await machineLearningRegistryCodeContainer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Code Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryCodeContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryCodeContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + string codeName = "testContainer"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // invoke the operation + MachineLearningCodeContainerData data = new MachineLearningCodeContainerData(new MachineLearningCodeContainerProperties() + { + Description = "string", + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +}, + }); + ArmOperation lro = await machineLearningRegistryCodeContainer.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryCodeContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs new file mode 100644 index 0000000000000..89cf78d1e02aa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryCodeVersionCollection + { + // List Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/list.json + // this example is just showing the usage of "RegistryCodeVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // get the collection of this MachineLearningRegistryCodeVersionResource + MachineLearningRegistryCodeVersionCollection collection = machineLearningRegistryCodeContainer.GetMachineLearningRegistryCodeVersions(); + + // invoke the operation and iterate over the result + string orderBy = "string"; + int? top = 1; + await foreach (MachineLearningRegistryCodeVersionResource item in collection.GetAllAsync(orderBy: orderBy, top: top)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/get.json + // this example is just showing the usage of "RegistryCodeVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // get the collection of this MachineLearningRegistryCodeVersionResource + MachineLearningRegistryCodeVersionCollection collection = machineLearningRegistryCodeContainer.GetMachineLearningRegistryCodeVersions(); + + // invoke the operation + string version = "string"; + MachineLearningRegistryCodeVersionResource result = await collection.GetAsync(version); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/get.json + // this example is just showing the usage of "RegistryCodeVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // get the collection of this MachineLearningRegistryCodeVersionResource + MachineLearningRegistryCodeVersionCollection collection = machineLearningRegistryCodeContainer.GetMachineLearningRegistryCodeVersions(); + + // invoke the operation + string version = "string"; + bool result = await collection.ExistsAsync(version); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/get.json + // this example is just showing the usage of "RegistryCodeVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // get the collection of this MachineLearningRegistryCodeVersionResource + MachineLearningRegistryCodeVersionCollection collection = machineLearningRegistryCodeContainer.GetMachineLearningRegistryCodeVersions(); + + // invoke the operation + string version = "string"; + NullableResponse response = await collection.GetIfExistsAsync(version); + MachineLearningRegistryCodeVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryCodeVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeContainerResource created on azure + // for more information of creating MachineLearningRegistryCodeContainerResource, please refer to the document of MachineLearningRegistryCodeContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + ResourceIdentifier machineLearningRegistryCodeContainerResourceId = MachineLearningRegistryCodeContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName); + MachineLearningRegistryCodeContainerResource machineLearningRegistryCodeContainer = client.GetMachineLearningRegistryCodeContainerResource(machineLearningRegistryCodeContainerResourceId); + + // get the collection of this MachineLearningRegistryCodeVersionResource + MachineLearningRegistryCodeVersionCollection collection = machineLearningRegistryCodeContainer.GetMachineLearningRegistryCodeVersions(); + + // invoke the operation + string version = "string"; + MachineLearningCodeVersionData data = new MachineLearningCodeVersionData(new MachineLearningCodeVersionProperties() + { + CodeUri = new Uri("https://blobStorage/folderName"), + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); + MachineLearningRegistryCodeVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs new file mode 100644 index 0000000000000..90c3aa41830b3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryCodeVersionResource + { + // Delete Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/delete.json + // this example is just showing the usage of "RegistryCodeVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeVersionResource created on azure + // for more information of creating MachineLearningRegistryCodeVersionResource, please refer to the document of MachineLearningRegistryCodeVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryCodeVersionResourceId = MachineLearningRegistryCodeVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName, version); + MachineLearningRegistryCodeVersionResource machineLearningRegistryCodeVersion = client.GetMachineLearningRegistryCodeVersionResource(machineLearningRegistryCodeVersionResourceId); + + // invoke the operation + await machineLearningRegistryCodeVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/get.json + // this example is just showing the usage of "RegistryCodeVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeVersionResource created on azure + // for more information of creating MachineLearningRegistryCodeVersionResource, please refer to the document of MachineLearningRegistryCodeVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryCodeVersionResourceId = MachineLearningRegistryCodeVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName, version); + MachineLearningRegistryCodeVersionResource machineLearningRegistryCodeVersion = client.GetMachineLearningRegistryCodeVersionResource(machineLearningRegistryCodeVersionResourceId); + + // invoke the operation + MachineLearningRegistryCodeVersionResource result = await machineLearningRegistryCodeVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryCodeVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeVersionResource created on azure + // for more information of creating MachineLearningRegistryCodeVersionResource, please refer to the document of MachineLearningRegistryCodeVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string codeName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryCodeVersionResourceId = MachineLearningRegistryCodeVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName, version); + MachineLearningRegistryCodeVersionResource machineLearningRegistryCodeVersion = client.GetMachineLearningRegistryCodeVersionResource(machineLearningRegistryCodeVersionResourceId); + + // invoke the operation + MachineLearningCodeVersionData data = new MachineLearningCodeVersionData(new MachineLearningCodeVersionProperties() + { + CodeUri = new Uri("https://blobStorage/folderName"), + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningRegistryCodeVersion.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryCodeVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningCodeVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrGetStartPendingUpload Registry Code Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadRegistryCodeVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + // this example is just showing the usage of "RegistryCodeVersions_CreateOrGetStartPendingUpload" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryCodeVersionResource created on azure + // for more information of creating MachineLearningRegistryCodeVersionResource, please refer to the document of MachineLearningRegistryCodeVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string codeName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryCodeVersionResourceId = MachineLearningRegistryCodeVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, codeName, version); + MachineLearningRegistryCodeVersionResource machineLearningRegistryCodeVersion = client.GetMachineLearningRegistryCodeVersionResource(machineLearningRegistryCodeVersionResourceId); + + // invoke the operation + PendingUploadRequestDto body = new PendingUploadRequestDto() + { + PendingUploadId = "string", + PendingUploadType = PendingUploadType.None, + }; + PendingUploadResponseDto result = await machineLearningRegistryCodeVersion.CreateOrGetStartPendingUploadAsync(body); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs new file mode 100644 index 0000000000000..4a1479b6f55ce --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryCollection + { + // List registries with system created accounts. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistriesWithSystemCreatedAccounts() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/list.json + // this example is just showing the usage of "Registries_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineLearningRegistryResource + MachineLearningRegistryCollection collection = resourceGroupResource.GetMachineLearningRegistries(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningRegistryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry with system created accounts. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryWithSystemCreatedAccounts() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/get.json + // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineLearningRegistryResource + MachineLearningRegistryCollection collection = resourceGroupResource.GetMachineLearningRegistries(); + + // invoke the operation + string registryName = "string"; + MachineLearningRegistryResource result = await collection.GetAsync(registryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry with system created accounts. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryWithSystemCreatedAccounts() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/get.json + // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineLearningRegistryResource + MachineLearningRegistryCollection collection = resourceGroupResource.GetMachineLearningRegistries(); + + // invoke the operation + string registryName = "string"; + bool result = await collection.ExistsAsync(registryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry with system created accounts. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryWithSystemCreatedAccounts() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/get.json + // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineLearningRegistryResource + MachineLearningRegistryCollection collection = resourceGroupResource.GetMachineLearningRegistries(); + + // invoke the operation + string registryName = "string"; + NullableResponse response = await collection.GetIfExistsAsync(registryName); + MachineLearningRegistryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry with system created accounts. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryWithSystemCreatedAccounts() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/createOrUpdate.json + // this example is just showing the usage of "Registries_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineLearningRegistryResource + MachineLearningRegistryCollection collection = resourceGroupResource.GetMachineLearningRegistries(); + + // invoke the operation + string registryName = "string"; + MachineLearningRegistryData data = new MachineLearningRegistryData(new AzureLocation("string")) + { + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("string")] = new UserAssignedIdentity(), +}, + }, + Kind = "string", + Sku = new MachineLearningSku("string") + { + Tier = MachineLearningSkuTier.Free, + Size = "string", + Family = "string", + Capacity = 1, + }, + DiscoveryUri = new Uri("string"), + IntellectualPropertyPublisher = "string", + ManagedResourceId = new ResourceIdentifier("string"), + MlFlowRegistryUri = new Uri("string"), + PrivateEndpointConnections = +{ +new RegistryPrivateEndpointConnection() +{ +Id = new ResourceIdentifier("string"), +Location = new AzureLocation("string"), +GroupIds = +{ +"string" +}, +PrivateEndpoint = new RegistryPrivateEndpoint() +{ +SubnetArmId = new ResourceIdentifier("string"), +}, +PrivateLinkServiceConnectionState = new RegistryPrivateLinkServiceConnectionState() +{ +ActionsRequired = "string", +Description = "string", +Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, +}, +ProvisioningState = "string", +} +}, + PublicNetworkAccess = "string", + RegionDetails = +{ +new RegistryRegionArmDetails() +{ +AcrDetails = +{ +new RegistryAcrDetails() +{ +SystemCreatedAcrAccount = new SystemCreatedAcrAccount() +{ +AcrAccountName = "string", +AcrAccountSku = "string", +ArmResourceId = new ResourceIdentifier("string"), +}, +} +}, +Location = new AzureLocation("string"), +StorageAccountDetails = +{ +new StorageAccountDetails() +{ +SystemCreatedStorageAccount = new SystemCreatedStorageAccount() +{ +AllowBlobPublicAccess = false, +ArmResourceId = new ResourceIdentifier("string"), +StorageAccountHnsEnabled = false, +StorageAccountName = "string", +StorageAccountType = "string", +}, +} +}, +} +}, + Tags = +{ +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, registryName, data); + MachineLearningRegistryResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs new file mode 100644 index 0000000000000..ba5a1ee470a25 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryDataContainerCollection + { + // RegistryList Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_RegistryListRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/registryList.json + // this example is just showing the usage of "RegistryDataContainers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryDataContainerResource + MachineLearningRegistryDataContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryDataContainers(); + + // invoke the operation and iterate over the result + MachineLearningListViewType? listViewType = MachineLearningListViewType.All; + await foreach (MachineLearningRegistryDataContainerResource item in collection.GetAllAsync(listViewType: listViewType)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataContainerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/get.json + // this example is just showing the usage of "RegistryDataContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryDataContainerResource + MachineLearningRegistryDataContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryDataContainers(); + + // invoke the operation + string name = "string"; + MachineLearningRegistryDataContainerResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/get.json + // this example is just showing the usage of "RegistryDataContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryDataContainerResource + MachineLearningRegistryDataContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryDataContainers(); + + // invoke the operation + string name = "string"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/get.json + // this example is just showing the usage of "RegistryDataContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryDataContainerResource + MachineLearningRegistryDataContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryDataContainers(); + + // invoke the operation + string name = "string"; + NullableResponse response = await collection.GetIfExistsAsync(name); + MachineLearningRegistryDataContainerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryDataContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryDataContainerResource + MachineLearningRegistryDataContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryDataContainers(); + + // invoke the operation + string name = "string"; + MachineLearningDataContainerData data = new MachineLearningDataContainerData(new MachineLearningDataContainerProperties(MachineLearningDataType.UriFolder) + { + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + MachineLearningRegistryDataContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs new file mode 100644 index 0000000000000..2af33dfd24848 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryDataContainerResource + { + // Delete Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/delete.json + // this example is just showing the usage of "RegistryDataContainers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // invoke the operation + await machineLearningRegistryDataContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/get.json + // this example is just showing the usage of "RegistryDataContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // invoke the operation + MachineLearningRegistryDataContainerResource result = await machineLearningRegistryDataContainer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Data Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryDataContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryDataContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // invoke the operation + MachineLearningDataContainerData data = new MachineLearningDataContainerData(new MachineLearningDataContainerProperties(MachineLearningDataType.UriFolder) + { + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningRegistryDataContainer.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryDataContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs new file mode 100644 index 0000000000000..cb1c302597ade --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryDataVersionCollection + { + // RegistryList Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_RegistryListRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/registryList.json + // this example is just showing the usage of "RegistryDataVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // get the collection of this MachineLearningRegistryDataVersionResource + MachineLearningRegistryDataVersionCollection collection = machineLearningRegistryDataContainer.GetMachineLearningRegistryDataVersions(); + + // invoke the operation and iterate over the result + string orderBy = "string"; + int? top = 1; + string tags = "string"; + MachineLearningListViewType? listViewType = MachineLearningListViewType.ArchivedOnly; + await foreach (MachineLearningRegistryDataVersionResource item in collection.GetAllAsync(orderBy: orderBy, top: top, tags: tags, listViewType: listViewType)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/get.json + // this example is just showing the usage of "RegistryDataVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // get the collection of this MachineLearningRegistryDataVersionResource + MachineLearningRegistryDataVersionCollection collection = machineLearningRegistryDataContainer.GetMachineLearningRegistryDataVersions(); + + // invoke the operation + string version = "string"; + MachineLearningRegistryDataVersionResource result = await collection.GetAsync(version); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/get.json + // this example is just showing the usage of "RegistryDataVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // get the collection of this MachineLearningRegistryDataVersionResource + MachineLearningRegistryDataVersionCollection collection = machineLearningRegistryDataContainer.GetMachineLearningRegistryDataVersions(); + + // invoke the operation + string version = "string"; + bool result = await collection.ExistsAsync(version); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/get.json + // this example is just showing the usage of "RegistryDataVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // get the collection of this MachineLearningRegistryDataVersionResource + MachineLearningRegistryDataVersionCollection collection = machineLearningRegistryDataContainer.GetMachineLearningRegistryDataVersions(); + + // invoke the operation + string version = "string"; + NullableResponse response = await collection.GetIfExistsAsync(version); + MachineLearningRegistryDataVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/createOrUpdate.json + // this example is just showing the usage of "RegistryDataVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataContainerResource created on azure + // for more information of creating MachineLearningRegistryDataContainerResource, please refer to the document of MachineLearningRegistryDataContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + ResourceIdentifier machineLearningRegistryDataContainerResourceId = MachineLearningRegistryDataContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name); + MachineLearningRegistryDataContainerResource machineLearningRegistryDataContainer = client.GetMachineLearningRegistryDataContainerResource(machineLearningRegistryDataContainerResourceId); + + // get the collection of this MachineLearningRegistryDataVersionResource + MachineLearningRegistryDataVersionCollection collection = machineLearningRegistryDataContainer.GetMachineLearningRegistryDataVersions(); + + // invoke the operation + string version = "string"; + MachineLearningDataVersionData data = new MachineLearningDataVersionData(new MachineLearningTable(new Uri("string")) + { + ReferencedUris = +{ +new Uri("string") +}, + IsAnonymous = false, + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); + MachineLearningRegistryDataVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs new file mode 100644 index 0000000000000..bee002d2524d7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryDataVersionResource + { + // Delete Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/delete.json + // this example is just showing the usage of "RegistryDataVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataVersionResource created on azure + // for more information of creating MachineLearningRegistryDataVersionResource, please refer to the document of MachineLearningRegistryDataVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryDataVersionResourceId = MachineLearningRegistryDataVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name, version); + MachineLearningRegistryDataVersionResource machineLearningRegistryDataVersion = client.GetMachineLearningRegistryDataVersionResource(machineLearningRegistryDataVersionResourceId); + + // invoke the operation + await machineLearningRegistryDataVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/get.json + // this example is just showing the usage of "RegistryDataVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataVersionResource created on azure + // for more information of creating MachineLearningRegistryDataVersionResource, please refer to the document of MachineLearningRegistryDataVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryDataVersionResourceId = MachineLearningRegistryDataVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name, version); + MachineLearningRegistryDataVersionResource machineLearningRegistryDataVersion = client.GetMachineLearningRegistryDataVersionResource(machineLearningRegistryDataVersionResourceId); + + // invoke the operation + MachineLearningRegistryDataVersionResource result = await machineLearningRegistryDataVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/createOrUpdate.json + // this example is just showing the usage of "RegistryDataVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataVersionResource created on azure + // for more information of creating MachineLearningRegistryDataVersionResource, please refer to the document of MachineLearningRegistryDataVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryDataVersionResourceId = MachineLearningRegistryDataVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name, version); + MachineLearningRegistryDataVersionResource machineLearningRegistryDataVersion = client.GetMachineLearningRegistryDataVersionResource(machineLearningRegistryDataVersionResourceId); + + // invoke the operation + MachineLearningDataVersionData data = new MachineLearningDataVersionData(new MachineLearningTable(new Uri("string")) + { + ReferencedUris = +{ +new Uri("string") +}, + IsAnonymous = false, + IsArchived = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningRegistryDataVersion.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryDataVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningDataVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrGetStartPendingUpload Registry Data Version Base. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadRegistryDataVersionBase() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json + // this example is just showing the usage of "RegistryDataVersions_CreateOrGetStartPendingUpload" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryDataVersionResource created on azure + // for more information of creating MachineLearningRegistryDataVersionResource, please refer to the document of MachineLearningRegistryDataVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string name = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryDataVersionResourceId = MachineLearningRegistryDataVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, name, version); + MachineLearningRegistryDataVersionResource machineLearningRegistryDataVersion = client.GetMachineLearningRegistryDataVersionResource(machineLearningRegistryDataVersionResourceId); + + // invoke the operation + PendingUploadRequestDto body = new PendingUploadRequestDto() + { + PendingUploadId = "string", + PendingUploadType = PendingUploadType.None, + }; + PendingUploadResponseDto result = await machineLearningRegistryDataVersion.CreateOrGetStartPendingUploadAsync(body); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs new file mode 100644 index 0000000000000..61277162af2f6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryEnvironmentContainerCollection + { + // List Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/list.json + // this example is just showing the usage of "RegistryEnvironmentContainers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentContainerResource + MachineLearningRegistryEnvironmentContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryEnvironmentContainers(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningRegistryEnvironmentContainerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentContainerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/get.json + // this example is just showing the usage of "RegistryEnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentContainerResource + MachineLearningRegistryEnvironmentContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryEnvironmentContainers(); + + // invoke the operation + string environmentName = "testEnvironment"; + MachineLearningRegistryEnvironmentContainerResource result = await collection.GetAsync(environmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/get.json + // this example is just showing the usage of "RegistryEnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentContainerResource + MachineLearningRegistryEnvironmentContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryEnvironmentContainers(); + + // invoke the operation + string environmentName = "testEnvironment"; + bool result = await collection.ExistsAsync(environmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/get.json + // this example is just showing the usage of "RegistryEnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentContainerResource + MachineLearningRegistryEnvironmentContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryEnvironmentContainers(); + + // invoke the operation + string environmentName = "testEnvironment"; + NullableResponse response = await collection.GetIfExistsAsync(environmentName); + MachineLearningRegistryEnvironmentContainerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryEnvironmentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentContainerResource + MachineLearningRegistryEnvironmentContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryEnvironmentContainers(); + + // invoke the operation + string environmentName = "testEnvironment"; + MachineLearningEnvironmentContainerData data = new MachineLearningEnvironmentContainerData(new MachineLearningEnvironmentContainerProperties() + { + Description = "string", + Properties = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + Tags = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, environmentName, data); + MachineLearningRegistryEnvironmentContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs new file mode 100644 index 0000000000000..d381c1d086f85 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryEnvironmentContainerResource + { + // Delete Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/delete.json + // this example is just showing the usage of "RegistryEnvironmentContainers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + string environmentName = "testContainer"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // invoke the operation + await machineLearningRegistryEnvironmentContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/get.json + // this example is just showing the usage of "RegistryEnvironmentContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + string environmentName = "testEnvironment"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // invoke the operation + MachineLearningRegistryEnvironmentContainerResource result = await machineLearningRegistryEnvironmentContainer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Environment Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryEnvironmentContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryEnvironmentContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "testregistry"; + string environmentName = "testEnvironment"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // invoke the operation + MachineLearningEnvironmentContainerData data = new MachineLearningEnvironmentContainerData(new MachineLearningEnvironmentContainerProperties() + { + Description = "string", + Properties = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + Tags = +{ +["additionalProp1"] = "string", +["additionalProp2"] = "string", +["additionalProp3"] = "string", +}, + }); + ArmOperation lro = await machineLearningRegistryEnvironmentContainer.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryEnvironmentContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs new file mode 100644 index 0000000000000..8009573a96c41 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryEnvironmentVersionCollection + { + // List Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/list.json + // this example is just showing the usage of "RegistryEnvironmentVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-regsitry"; + string environmentName = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentVersionResource + MachineLearningRegistryEnvironmentVersionCollection collection = machineLearningRegistryEnvironmentContainer.GetMachineLearningRegistryEnvironmentVersions(); + + // invoke the operation and iterate over the result + string orderBy = "string"; + int? top = 1; + await foreach (MachineLearningRegistryEnvironmentVersionResource item in collection.GetAllAsync(orderBy: orderBy, top: top)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/get.json + // this example is just showing the usage of "RegistryEnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string environmentName = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentVersionResource + MachineLearningRegistryEnvironmentVersionCollection collection = machineLearningRegistryEnvironmentContainer.GetMachineLearningRegistryEnvironmentVersions(); + + // invoke the operation + string version = "string"; + MachineLearningRegistryEnvironmentVersionResource result = await collection.GetAsync(version); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/get.json + // this example is just showing the usage of "RegistryEnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string environmentName = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentVersionResource + MachineLearningRegistryEnvironmentVersionCollection collection = machineLearningRegistryEnvironmentContainer.GetMachineLearningRegistryEnvironmentVersions(); + + // invoke the operation + string version = "string"; + bool result = await collection.ExistsAsync(version); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/get.json + // this example is just showing the usage of "RegistryEnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string environmentName = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentVersionResource + MachineLearningRegistryEnvironmentVersionCollection collection = machineLearningRegistryEnvironmentContainer.GetMachineLearningRegistryEnvironmentVersions(); + + // invoke the operation + string version = "string"; + NullableResponse response = await collection.GetIfExistsAsync(version); + MachineLearningRegistryEnvironmentVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryEnvironmentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentContainerResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentContainerResource, please refer to the document of MachineLearningRegistryEnvironmentContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string environmentName = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentContainerResourceId = MachineLearningRegistryEnvironmentContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName); + MachineLearningRegistryEnvironmentContainerResource machineLearningRegistryEnvironmentContainer = client.GetMachineLearningRegistryEnvironmentContainerResource(machineLearningRegistryEnvironmentContainerResourceId); + + // get the collection of this MachineLearningRegistryEnvironmentVersionResource + MachineLearningRegistryEnvironmentVersionCollection collection = machineLearningRegistryEnvironmentContainer.GetMachineLearningRegistryEnvironmentVersions(); + + // invoke the operation + string version = "string"; + MachineLearningEnvironmentVersionData data = new MachineLearningEnvironmentVersionData(new MachineLearningEnvironmentVersionProperties() + { + Build = new MachineLearningBuildContext(new Uri("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/")) + { + DockerfilePath = "prod/Dockerfile", + }, + CondaFile = "string", + Image = "docker.io/tensorflow/serving:latest", + InferenceConfig = new MachineLearningInferenceContainerProperties() + { + LivenessRoute = new MachineLearningInferenceContainerRoute("string", 1), + ReadinessRoute = new MachineLearningInferenceContainerRoute("string", 1), + ScoringRoute = new MachineLearningInferenceContainerRoute("string", 1), + }, + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); + MachineLearningRegistryEnvironmentVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs new file mode 100644 index 0000000000000..f2a307d933c3c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryEnvironmentVersionResource + { + // Delete Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/delete.json + // this example is just showing the usage of "RegistryEnvironmentVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentVersionResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentVersionResource, please refer to the document of MachineLearningRegistryEnvironmentVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string environmentName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentVersionResourceId = MachineLearningRegistryEnvironmentVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName, version); + MachineLearningRegistryEnvironmentVersionResource machineLearningRegistryEnvironmentVersion = client.GetMachineLearningRegistryEnvironmentVersionResource(machineLearningRegistryEnvironmentVersionResourceId); + + // invoke the operation + await machineLearningRegistryEnvironmentVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/get.json + // this example is just showing the usage of "RegistryEnvironmentVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentVersionResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentVersionResource, please refer to the document of MachineLearningRegistryEnvironmentVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string environmentName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentVersionResourceId = MachineLearningRegistryEnvironmentVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName, version); + MachineLearningRegistryEnvironmentVersionResource machineLearningRegistryEnvironmentVersion = client.GetMachineLearningRegistryEnvironmentVersionResource(machineLearningRegistryEnvironmentVersionResourceId); + + // invoke the operation + MachineLearningRegistryEnvironmentVersionResource result = await machineLearningRegistryEnvironmentVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Environment Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryEnvironmentVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/EnvironmentVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryEnvironmentVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryEnvironmentVersionResource created on azure + // for more information of creating MachineLearningRegistryEnvironmentVersionResource, please refer to the document of MachineLearningRegistryEnvironmentVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string environmentName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryEnvironmentVersionResourceId = MachineLearningRegistryEnvironmentVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, environmentName, version); + MachineLearningRegistryEnvironmentVersionResource machineLearningRegistryEnvironmentVersion = client.GetMachineLearningRegistryEnvironmentVersionResource(machineLearningRegistryEnvironmentVersionResourceId); + + // invoke the operation + MachineLearningEnvironmentVersionData data = new MachineLearningEnvironmentVersionData(new MachineLearningEnvironmentVersionProperties() + { + Build = new MachineLearningBuildContext(new Uri("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/")) + { + DockerfilePath = "prod/Dockerfile", + }, + CondaFile = "string", + Image = "docker.io/tensorflow/serving:latest", + InferenceConfig = new MachineLearningInferenceContainerProperties() + { + LivenessRoute = new MachineLearningInferenceContainerRoute("string", 1), + ReadinessRoute = new MachineLearningInferenceContainerRoute("string", 1), + ScoringRoute = new MachineLearningInferenceContainerRoute("string", 1), + }, + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningRegistryEnvironmentVersion.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryEnvironmentVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningEnvironmentVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs new file mode 100644 index 0000000000000..8bbf825635189 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryModelContainerCollection + { + // List Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/list.json + // this example is just showing the usage of "RegistryModelContainers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryModelContainerResource + MachineLearningRegistryModelContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryModelContainers(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningRegistryModelContainerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelContainerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/get.json + // this example is just showing the usage of "RegistryModelContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryModelContainerResource + MachineLearningRegistryModelContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryModelContainers(); + + // invoke the operation + string modelName = "testContainer"; + MachineLearningRegistryModelContainerResource result = await collection.GetAsync(modelName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/get.json + // this example is just showing the usage of "RegistryModelContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryModelContainerResource + MachineLearningRegistryModelContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryModelContainers(); + + // invoke the operation + string modelName = "testContainer"; + bool result = await collection.ExistsAsync(modelName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/get.json + // this example is just showing the usage of "RegistryModelContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryModelContainerResource + MachineLearningRegistryModelContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryModelContainers(); + + // invoke the operation + string modelName = "testContainer"; + NullableResponse response = await collection.GetIfExistsAsync(modelName); + MachineLearningRegistryModelContainerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryModelContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // get the collection of this MachineLearningRegistryModelContainerResource + MachineLearningRegistryModelContainerCollection collection = machineLearningRegistry.GetMachineLearningRegistryModelContainers(); + + // invoke the operation + string modelName = "testContainer"; + MachineLearningModelContainerData data = new MachineLearningModelContainerData(new MachineLearningModelContainerProperties() + { + Description = "Model container description", + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, modelName, data); + MachineLearningRegistryModelContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs new file mode 100644 index 0000000000000..4d449c4dfbcf8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryModelContainerResource + { + // Delete Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/delete.json + // this example is just showing the usage of "RegistryModelContainers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + string modelName = "testContainer"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // invoke the operation + await machineLearningRegistryModelContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/get.json + // this example is just showing the usage of "RegistryModelContainers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + string modelName = "testContainer"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // invoke the operation + MachineLearningRegistryModelContainerResource result = await machineLearningRegistryModelContainer.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Model Container. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryModelContainer() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelContainer/createOrUpdate.json + // this example is just showing the usage of "RegistryModelContainers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg123"; + string registryName = "registry123"; + string modelName = "testContainer"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // invoke the operation + MachineLearningModelContainerData data = new MachineLearningModelContainerData(new MachineLearningModelContainerProperties() + { + Description = "Model container description", + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +}, + }); + ArmOperation lro = await machineLearningRegistryModelContainer.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryModelContainerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs new file mode 100644 index 0000000000000..dd1834edf602e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryModelVersionCollection + { + // List Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/list.json + // this example is just showing the usage of "RegistryModelVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // get the collection of this MachineLearningRegistryModelVersionResource + MachineLearningRegistryModelVersionCollection collection = machineLearningRegistryModelContainer.GetMachineLearningRegistryModelVersions(); + + // invoke the operation and iterate over the result + MachineLearningRegistryModelVersionCollectionGetAllOptions options = new MachineLearningRegistryModelVersionCollectionGetAllOptions() { OrderBy = "string", Top = 1, Version = "string", Description = "string", Tags = "string", Properties = "string" }; + await foreach (MachineLearningRegistryModelVersionResource item in collection.GetAllAsync(options)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/get.json + // this example is just showing the usage of "RegistryModelVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // get the collection of this MachineLearningRegistryModelVersionResource + MachineLearningRegistryModelVersionCollection collection = machineLearningRegistryModelContainer.GetMachineLearningRegistryModelVersions(); + + // invoke the operation + string version = "string"; + MachineLearningRegistryModelVersionResource result = await collection.GetAsync(version); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/get.json + // this example is just showing the usage of "RegistryModelVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // get the collection of this MachineLearningRegistryModelVersionResource + MachineLearningRegistryModelVersionCollection collection = machineLearningRegistryModelContainer.GetMachineLearningRegistryModelVersions(); + + // invoke the operation + string version = "string"; + bool result = await collection.ExistsAsync(version); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/get.json + // this example is just showing the usage of "RegistryModelVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // get the collection of this MachineLearningRegistryModelVersionResource + MachineLearningRegistryModelVersionCollection collection = machineLearningRegistryModelContainer.GetMachineLearningRegistryModelVersions(); + + // invoke the operation + string version = "string"; + NullableResponse response = await collection.GetIfExistsAsync(version); + MachineLearningRegistryModelVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // CreateOrUpdate Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryModelVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelContainerResource created on azure + // for more information of creating MachineLearningRegistryModelContainerResource, please refer to the document of MachineLearningRegistryModelContainerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + ResourceIdentifier machineLearningRegistryModelContainerResourceId = MachineLearningRegistryModelContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName); + MachineLearningRegistryModelContainerResource machineLearningRegistryModelContainer = client.GetMachineLearningRegistryModelContainerResource(machineLearningRegistryModelContainerResourceId); + + // get the collection of this MachineLearningRegistryModelVersionResource + MachineLearningRegistryModelVersionCollection collection = machineLearningRegistryModelContainer.GetMachineLearningRegistryModelVersions(); + + // invoke the operation + string version = "string"; + MachineLearningModelVersionData data = new MachineLearningModelVersionData(new MachineLearningModelVersionProperties() + { + Flavors = +{ +["string"] = new MachineLearningFlavorData() +{ +Data = +{ +["string"] = "string", +}, +}, +}, + ModelType = "CustomModel", + ModelUri = new Uri("string"), + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); + MachineLearningRegistryModelVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs new file mode 100644 index 0000000000000..53ff19c1b030a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryModelVersionResource + { + // Delete Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/delete.json + // this example is just showing the usage of "RegistryModelVersions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelVersionResource created on azure + // for more information of creating MachineLearningRegistryModelVersionResource, please refer to the document of MachineLearningRegistryModelVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryModelVersionResourceId = MachineLearningRegistryModelVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName, version); + MachineLearningRegistryModelVersionResource machineLearningRegistryModelVersion = client.GetMachineLearningRegistryModelVersionResource(machineLearningRegistryModelVersionResourceId); + + // invoke the operation + await machineLearningRegistryModelVersion.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/get.json + // this example is just showing the usage of "RegistryModelVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelVersionResource created on azure + // for more information of creating MachineLearningRegistryModelVersionResource, please refer to the document of MachineLearningRegistryModelVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryModelVersionResourceId = MachineLearningRegistryModelVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName, version); + MachineLearningRegistryModelVersionResource machineLearningRegistryModelVersion = client.GetMachineLearningRegistryModelVersionResource(machineLearningRegistryModelVersionResourceId); + + // invoke the operation + MachineLearningRegistryModelVersionResource result = await machineLearningRegistryModelVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // CreateOrUpdate Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/createOrUpdate.json + // this example is just showing the usage of "RegistryModelVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelVersionResource created on azure + // for more information of creating MachineLearningRegistryModelVersionResource, please refer to the document of MachineLearningRegistryModelVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryModelVersionResourceId = MachineLearningRegistryModelVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName, version); + MachineLearningRegistryModelVersionResource machineLearningRegistryModelVersion = client.GetMachineLearningRegistryModelVersionResource(machineLearningRegistryModelVersionResourceId); + + // invoke the operation + MachineLearningModelVersionData data = new MachineLearningModelVersionData(new MachineLearningModelVersionProperties() + { + Flavors = +{ +["string"] = new MachineLearningFlavorData() +{ +Data = +{ +["string"] = "string", +}, +}, +}, + ModelType = "CustomModel", + ModelUri = new Uri("string"), + IsAnonymous = false, + Description = "string", + Properties = +{ +["string"] = "string", +}, + Tags = +{ +["string"] = "string", +}, + }); + ArmOperation lro = await machineLearningRegistryModelVersion.UpdateAsync(WaitUntil.Completed, data); + MachineLearningRegistryModelVersionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningModelVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Package Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Package_PackageRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/package.json + // this example is just showing the usage of "RegistryModelVersions_Package" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelVersionResource created on azure + // for more information of creating MachineLearningRegistryModelVersionResource, please refer to the document of MachineLearningRegistryModelVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "my-aml-registry"; + string modelName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryModelVersionResourceId = MachineLearningRegistryModelVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName, version); + MachineLearningRegistryModelVersionResource machineLearningRegistryModelVersion = client.GetMachineLearningRegistryModelVersionResource(machineLearningRegistryModelVersionResourceId); + + // invoke the operation + ModelPackageContent content = new ModelPackageContent(new AzureMLBatchInferencingServer() + { + CodeConfiguration = new MachineLearningCodeConfiguration("string") + { + CodeId = new ResourceIdentifier("string"), + }, + }, "string") + { + BaseEnvironmentSource = new BaseEnvironmentType(new ResourceIdentifier("string")), + EnvironmentVariables = +{ +["string"] = "string", +}, + Inputs = +{ +new ModelPackageInput(PackageInputType.UriFile,new PackageInputPathUri() +{ +Uri = new Uri("string"), +}) +{ +Mode = PackageInputDeliveryMode.Download, +MountPath = "string", +} +}, + ModelConfiguration = new ModelConfiguration() + { + Mode = new PackageInputDeliveryMode("ReadOnlyMount"), + MountPath = "string", + }, + Tags = +{ +["string"] = "string", +}, + }; + ArmOperation lro = await machineLearningRegistryModelVersion.PackageAsync(WaitUntil.Completed, content); + ModelPackageResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // CreateOrGetStartPendingUpload Registry Model Version. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadRegistryModelVersion() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json + // this example is just showing the usage of "RegistryModelVersions_CreateOrGetStartPendingUpload" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryModelVersionResource created on azure + // for more information of creating MachineLearningRegistryModelVersionResource, please refer to the document of MachineLearningRegistryModelVersionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "registryName"; + string modelName = "string"; + string version = "string"; + ResourceIdentifier machineLearningRegistryModelVersionResourceId = MachineLearningRegistryModelVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, modelName, version); + MachineLearningRegistryModelVersionResource machineLearningRegistryModelVersion = client.GetMachineLearningRegistryModelVersionResource(machineLearningRegistryModelVersionResourceId); + + // invoke the operation + PendingUploadRequestDto body = new PendingUploadRequestDto() + { + PendingUploadId = "string", + PendingUploadType = PendingUploadType.None, + }; + PendingUploadResponseDto result = await machineLearningRegistryModelVersion.CreateOrGetStartPendingUploadAsync(body); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs new file mode 100644 index 0000000000000..dc9902c8ab35f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MachineLearning.Samples +{ + public partial class Sample_MachineLearningRegistryResource + { + // List registries by subscription. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMachineLearningRegistries_ListRegistriesBySubscription() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/listBySubscription.json + // this example is just showing the usage of "Registries_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (MachineLearningRegistryResource item in subscriptionResource.GetMachineLearningRegistriesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Delete Registry. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRegistry() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/delete.json + // this example is just showing the usage of "Registries_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "string"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // invoke the operation + await machineLearningRegistry.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get Registry with system created accounts. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetRegistryWithSystemCreatedAccounts() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/get.json + // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "string"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // invoke the operation + MachineLearningRegistryResource result = await machineLearningRegistry.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update Registry with system created accounts. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateRegistryWithSystemCreatedAccounts() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/update.json + // this example is just showing the usage of "Registries_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "string"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // invoke the operation + MachineLearningRegistryPatch patch = new MachineLearningRegistryPatch() + { + Identity = new ManagedServiceIdentity("SystemAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("string")] = new UserAssignedIdentity(), +}, + }, + Sku = new MachineLearningSkuPatch() + { + Capacity = 1, + Family = "string", + Name = "string", + Size = "string", + Tier = MachineLearningSkuTier.Basic, + }, + Tags = +{ +}, + }; + MachineLearningRegistryResource result = await machineLearningRegistry.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Remove regions from registry + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RemoveRegions_RemoveRegionsFromRegistry() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Registries/removeRegions.json + // this example is just showing the usage of "Registries_RemoveRegions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningRegistryResource created on azure + // for more information of creating MachineLearningRegistryResource, please refer to the document of MachineLearningRegistryResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string registryName = "string"; + ResourceIdentifier machineLearningRegistryResourceId = MachineLearningRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + MachineLearningRegistryResource machineLearningRegistry = client.GetMachineLearningRegistryResource(machineLearningRegistryResourceId); + + // invoke the operation + MachineLearningRegistryData data = new MachineLearningRegistryData(new AzureLocation("string")) + { + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("string")] = new UserAssignedIdentity(), +}, + }, + Kind = "string", + Sku = new MachineLearningSku("string") + { + Tier = MachineLearningSkuTier.Free, + Size = "string", + Family = "string", + Capacity = 1, + }, + DiscoveryUri = new Uri("string"), + IntellectualPropertyPublisher = "string", + ManagedResourceId = new ResourceIdentifier("string"), + MlFlowRegistryUri = new Uri("string"), + PrivateEndpointConnections = +{ +new RegistryPrivateEndpointConnection() +{ +Id = new ResourceIdentifier("string"), +Location = new AzureLocation("string"), +GroupIds = +{ +"string" +}, +PrivateEndpoint = new RegistryPrivateEndpoint() +{ +SubnetArmId = new ResourceIdentifier("string"), +}, +PrivateLinkServiceConnectionState = new RegistryPrivateLinkServiceConnectionState() +{ +ActionsRequired = "string", +Description = "string", +Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, +}, +ProvisioningState = "string", +} +}, + PublicNetworkAccess = "string", + RegionDetails = +{ +new RegistryRegionArmDetails() +{ +AcrDetails = +{ +new RegistryAcrDetails() +{ +SystemCreatedAcrAccount = new SystemCreatedAcrAccount() +{ +AcrAccountName = "string", +AcrAccountSku = "string", +ArmResourceId = new ResourceIdentifier("string"), +}, +} +}, +Location = new AzureLocation("string"), +StorageAccountDetails = +{ +new StorageAccountDetails() +{ +SystemCreatedStorageAccount = new SystemCreatedStorageAccount() +{ +AllowBlobPublicAccess = false, +ArmResourceId = new ResourceIdentifier("string"), +StorageAccountHnsEnabled = false, +StorageAccountName = "string", +StorageAccountType = "string", +}, +} +}, +} +}, + Tags = +{ +}, + }; + ArmOperation lro = await machineLearningRegistry.RemoveRegionsAsync(WaitUntil.Completed, data); + MachineLearningRegistryResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs index 0fb6cab4ba236..16476a53ea469 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_MachineLearningScheduleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSchedules() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/list.json // this example is just showing the usage of "Schedules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_ListSchedules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Exists_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/createOrUpdate.json // this example is just showing the usage of "Schedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs index 2baae7814a16d..837eb05cfe1dc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs @@ -24,7 +24,7 @@ public partial class Sample_MachineLearningScheduleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/delete.json // this example is just showing the usage of "Schedules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Delete_DeleteSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Schedule/createOrUpdate.json // this example is just showing the usage of "Schedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs index 5f299f24de640..5045844f360c9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs @@ -20,12 +20,48 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceCollection { + // Get Workspaces by Resource Group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetWorkspacesByResourceGroup() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/listByResourceGroup.json + // this example is just showing the usage of "Workspaces_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineLearningWorkspaceResource + MachineLearningWorkspaceCollection collection = resourceGroupResource.GetMachineLearningWorkspaces(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningWorkspaceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Get Workspace [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/get.json // this example is just showing the usage of "Workspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +95,7 @@ public async Task Get_GetWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/get.json // this example is just showing the usage of "Workspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +125,7 @@ public async Task Exists_GetWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/get.json // this example is just showing the usage of "Workspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +167,7 @@ public async Task GetIfExists_GetWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/create.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/create.json // this example is just showing the usage of "Workspaces_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,31 +196,31 @@ public async Task CreateOrUpdate_CreateWorkspace() [new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")] = new UserAssignedIdentity(), }, }, - Description = "test description", - FriendlyName = "HelloName", - KeyVault = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", ApplicationInsights = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", ContainerRegistry = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", - StorageAccount = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount", - Encryption = new MachineLearningEncryptionSetting(MachineLearningEncryptionStatus.Enabled, new MachineLearningEncryptionKeyVaultProperties(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb") + Description = "test description", + Encryption = new MachineLearningEncryptionSetting(new MachineLearningEncryptionKeyVaultProperties("https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv")) { IdentityClientId = "", - }) + }, MachineLearningEncryptionStatus.Enabled) { UserAssignedIdentity = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai"), }, + FriendlyName = "HelloName", IsHbiWorkspace = false, + KeyVault = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", SharedPrivateLinkResources = { new MachineLearningSharedPrivateLinkResource() { Name = "testdbresource", -PrivateLinkResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql"), GroupId = "Sql", +PrivateLinkResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql"), RequestMessage = "Please approve", Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, } }, + StorageAccount = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workspaceName, data); MachineLearningWorkspaceResource result = lro.Value; @@ -195,41 +231,5 @@ public async Task CreateOrUpdate_CreateWorkspace() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - - // Get Workspaces by Resource Group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_GetWorkspacesByResourceGroup() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listByResourceGroup.json - // this example is just showing the usage of "Workspaces_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "workspace-1234"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MachineLearningWorkspaceResource - MachineLearningWorkspaceCollection collection = resourceGroupResource.GetMachineLearningWorkspaces(); - - // invoke the operation and iterate over the result - await foreach (MachineLearningWorkspaceResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningWorkspaceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs index 2332d53c28a2b..98e073f189e64 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs @@ -18,13 +18,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceConnectionCollection { - // CreateWorkspaceConnection + // ListWorkspaceConnections [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateWorkspaceConnection() + public async Task GetAll_ListWorkspaceConnections() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/create.json - // this example is just showing the usage of "WorkspaceConnections_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/list.json + // this example is just showing the usage of "WorkspaceConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -42,21 +42,19 @@ public async Task CreateOrUpdate_CreateWorkspaceConnection() // get the collection of this MachineLearningWorkspaceConnectionResource MachineLearningWorkspaceConnectionCollection collection = machineLearningWorkspace.GetMachineLearningWorkspaceConnections(); - // invoke the operation - string connectionName = "connection-1"; - MachineLearningWorkspaceConnectionData data = new MachineLearningWorkspaceConnectionData(new MachineLearningNoneAuthTypeWorkspaceConnection() + // invoke the operation and iterate over the result + string target = "www.facebook.com"; + string category = "ContainerRegistry"; + await foreach (MachineLearningWorkspaceConnectionResource item in collection.GetAllAsync(target: target, category: category)) { - Category = MachineLearningConnectionCategory.ContainerRegistry, - Target = "www.facebook.com", - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectionName, data); - MachineLearningWorkspaceConnectionResource result = lro.Value; + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningWorkspaceConnectionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded"); } // GetWorkspaceConnection @@ -64,7 +62,7 @@ public async Task CreateOrUpdate_CreateWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +97,7 @@ public async Task Get_GetWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +128,7 @@ public async Task Exists_GetWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,13 +166,13 @@ public async Task GetIfExists_GetWorkspaceConnection() } } - // ListWorkspaceConnections + // CreateWorkspaceConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListWorkspaceConnections() + public async Task CreateOrUpdate_CreateWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/list.json - // this example is just showing the usage of "WorkspaceConnections_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/create.json + // this example is just showing the usage of "WorkspaceConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -192,19 +190,22 @@ public async Task GetAll_ListWorkspaceConnections() // get the collection of this MachineLearningWorkspaceConnectionResource MachineLearningWorkspaceConnectionCollection collection = machineLearningWorkspace.GetMachineLearningWorkspaceConnections(); - // invoke the operation and iterate over the result - string target = "www.facebook.com"; - string category = "ContainerRegistry"; - await foreach (MachineLearningWorkspaceConnectionResource item in collection.GetAllAsync(target: target, category: category)) + // invoke the operation + string connectionName = "connection-1"; + MachineLearningWorkspaceConnectionData data = new MachineLearningWorkspaceConnectionData(new MachineLearningNoneAuthTypeWorkspaceConnection() { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningWorkspaceConnectionData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + Category = MachineLearningConnectionCategory.ContainerRegistry, + ExpiryOn = DateTimeOffset.Parse("2024-03-15T14:30:00Z"), + Target = "www.facebook.com", + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectionName, data); + MachineLearningWorkspaceConnectionResource result = lro.Value; - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs index 43e0b44efc0ab..fc1d009413c30 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading.Tasks; using Azure; using Azure.Core; @@ -18,13 +19,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceConnectionResource { - // CreateWorkspaceConnection + // DeleteWorkspaceConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateWorkspaceConnection() + public async Task Delete_DeleteWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/create.json - // this example is just showing the usage of "WorkspaceConnections_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/delete.json + // this example is just showing the usage of "WorkspaceConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,19 +42,9 @@ public async Task Update_CreateWorkspaceConnection() MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); // invoke the operation - MachineLearningWorkspaceConnectionData data = new MachineLearningWorkspaceConnectionData(new MachineLearningNoneAuthTypeWorkspaceConnection() - { - Category = MachineLearningConnectionCategory.ContainerRegistry, - Target = "www.facebook.com", - }); - ArmOperation lro = await machineLearningWorkspaceConnection.UpdateAsync(WaitUntil.Completed, data); - MachineLearningWorkspaceConnectionResource result = lro.Value; + await machineLearningWorkspaceConnection.DeleteAsync(WaitUntil.Completed); - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningWorkspaceConnectionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded"); } // GetWorkspaceConnection @@ -61,7 +52,7 @@ public async Task Update_CreateWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,13 +79,13 @@ public async Task Get_GetWorkspaceConnection() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // DeleteWorkspaceConnection + // UpdateWorkspaceConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteWorkspaceConnection() + public async Task Update_UpdateWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/delete.json - // this example is just showing the usage of "WorkspaceConnections_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/update.json + // this example is just showing the usage of "WorkspaceConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -104,16 +95,69 @@ public async Task Delete_DeleteWorkspaceConnection() // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "workspace-1"; - string connectionName = "connection-1"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + string connectionName = "some_string"; ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); // invoke the operation - await machineLearningWorkspaceConnection.DeleteAsync(WaitUntil.Completed); + MachineLearningWorkspaceConnectionPatch patch = new MachineLearningWorkspaceConnectionPatch() + { + Properties = new AccessKeyAuthTypeWorkspaceConnectionProperties() + { + Credentials = new WorkspaceConnectionAccessKey() + { + AccessKeyId = "some_string", + SecretAccessKey = "some_string", + }, + Category = MachineLearningConnectionCategory.AdlsGen2, + ExpiryOn = DateTimeOffset.Parse("2020-01-01T00:00:00Z"), + Metadata = BinaryData.FromObjectAsJson(new Dictionary() + { + }), + Target = "some_string", + }, + }; + MachineLearningWorkspaceConnectionResource result = await machineLearningWorkspaceConnection.UpdateAsync(patch); - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // GetWorkspaceConnection + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSecrets_GetWorkspaceConnection() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceConnection/listSecrets.json + // this example is just showing the usage of "WorkspaceConnections_ListSecrets" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure + // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; + string connectionName = "some_string"; + ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); + MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); + + // invoke the operation + MachineLearningWorkspaceConnectionResource result = await machineLearningWorkspaceConnection.GetSecretsAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs index a5fea400711cf..dd31c7ab2d603 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs @@ -19,13 +19,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceResource { - // Get Workspace + // List Workspace features [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetWorkspace() + public async Task GetWorkspaceFeatures_ListWorkspaceFeatures() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json - // this example is just showing the usage of "Workspaces_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/WorkspaceFeature/list.json + // this example is just showing the usage of "WorkspaceFeatures_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -34,20 +34,51 @@ public async Task Get_GetWorkspace() // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "workspace-1234"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; string workspaceName = "testworkspace"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - // invoke the operation - MachineLearningWorkspaceResource result = await machineLearningWorkspace.GetAsync(); + // invoke the operation and iterate over the result + await foreach (MachineLearningUserFeature item in machineLearningWorkspace.GetWorkspaceFeaturesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningWorkspaceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded"); + } + + // Get Workspaces by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMachineLearningWorkspaces_GetWorkspacesBySubscription() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/listBySubscription.json + // this example is just showing the usage of "Workspaces_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (MachineLearningWorkspaceResource item in subscriptionResource.GetMachineLearningWorkspacesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); } // Delete Workspace @@ -55,7 +86,7 @@ public async Task Get_GetWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/delete.json // this example is just showing the usage of "Workspaces_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,12 +108,43 @@ public async Task Delete_DeleteWorkspace() Console.WriteLine($"Succeeded"); } + // Get Workspace + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWorkspace() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/get.json + // this example is just showing the usage of "Workspaces_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // invoke the operation + MachineLearningWorkspaceResource result = await machineLearningWorkspace.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Update Workspace [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/update.json // this example is just showing the usage of "Workspaces_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,7 +165,7 @@ public async Task Update_UpdateWorkspace() { Description = "new description", FriendlyName = "New friendly name", - PublicNetworkAccess = MachineLearningPublicNetworkAccess.Disabled, + PublicNetworkAccessType = MachineLearningPublicNetworkAccessType.Disabled, }; ArmOperation lro = await machineLearningWorkspace.UpdateAsync(WaitUntil.Completed, patch); MachineLearningWorkspaceResource result = lro.Value; @@ -120,7 +182,7 @@ public async Task Update_UpdateWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Diagnose_DiagnoseWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/diagnose.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/diagnose.json // this example is just showing the usage of "Workspaces_Diagnose" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,31 +203,31 @@ public async Task Diagnose_DiagnoseWorkspace() { Value = new MachineLearningWorkspaceDiagnoseProperties() { - Udr = + ApplicationInsights = { }, - Nsg = + ContainerRegistry = { }, - ResourceLock = + DnsResolution = { }, - DnsResolution = + KeyVault = { }, - StorageAccount = + Nsg = { }, - KeyVault = + Others = { }, - ContainerRegistry = + ResourceLock = { }, - ApplicationInsights = + StorageAccount = { }, - Others = + Udr = { }, }, @@ -181,7 +243,7 @@ public async Task Diagnose_DiagnoseWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/listKeys.json // this example is just showing the usage of "Workspaces_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,13 +265,13 @@ public async Task GetKeys_ListWorkspaceKeys() Console.WriteLine($"Succeeded: {result}"); } - // Resync Workspace Keys + // List Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ResyncKeys_ResyncWorkspaceKeys() + public async Task GetNotebookAccessToken_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/resyncKeys.json - // this example is just showing the usage of "Workspaces_ResyncKeys" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/listNotebookAccessToken.json + // this example is just showing the usage of "Workspaces_ListNotebookAccessToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -218,57 +280,25 @@ public async Task ResyncKeys_ResyncWorkspaceKeys() // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); // invoke the operation - await machineLearningWorkspace.ResyncKeysAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get Workspaces by subscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetMachineLearningWorkspaces_GetWorkspacesBySubscription() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listBySubscription.json - // this example is just showing the usage of "Workspaces_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (MachineLearningWorkspaceResource item in subscriptionResource.GetMachineLearningWorkspacesAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MachineLearningWorkspaceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + MachineLearningWorkspaceNotebookAccessTokenResult result = await machineLearningWorkspace.GetNotebookAccessTokenAsync(); - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // List Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetNotebookAccessToken_ListWorkspaceKeys() + public async Task GetNotebookKeys_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listNotebookAccessToken.json - // this example is just showing the usage of "Workspaces_ListNotebookAccessToken" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Notebook/listKeys.json + // this example is just showing the usage of "Workspaces_ListNotebookKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -277,25 +307,25 @@ public async Task GetNotebookAccessToken_ListWorkspaceKeys() // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "workspace-1234"; - string workspaceName = "testworkspace"; + string subscriptionId = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; + string resourceGroupName = "testrg123"; + string workspaceName = "workspaces123"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); // invoke the operation - MachineLearningWorkspaceNotebookAccessTokenResult result = await machineLearningWorkspace.GetNotebookAccessTokenAsync(); + MachineLearningWorkspaceGetNotebookKeysResult result = await machineLearningWorkspace.GetNotebookKeysAsync(); Console.WriteLine($"Succeeded: {result}"); } - // Prepare Notebook + // List Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task PrepareNotebook_PrepareNotebook() + public async Task GetStorageAccountKeys_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/prepare.json - // this example is just showing the usage of "Workspaces_PrepareNotebook" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/listStorageAccountKeys.json + // this example is just showing the usage of "Workspaces_ListStorageAccountKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -311,19 +341,18 @@ public async Task PrepareNotebook_PrepareNotebook() MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); // invoke the operation - ArmOperation lro = await machineLearningWorkspace.PrepareNotebookAsync(WaitUntil.Completed); - MachineLearningNotebookResourceInfo result = lro.Value; + MachineLearningWorkspaceGetStorageAccountKeysResult result = await machineLearningWorkspace.GetStorageAccountKeysAsync(); Console.WriteLine($"Succeeded: {result}"); } - // List Workspace Keys + // ListOutboundNetworkDependenciesEndpoints [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetStorageAccountKeys_ListWorkspaceKeys() + public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDependenciesEndpoints() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listStorageAccountKeys.json - // this example is just showing the usage of "Workspaces_ListStorageAccountKeys" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ExternalFQDN/get.json + // this example is just showing the usage of "Workspaces_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -332,25 +361,28 @@ public async Task GetStorageAccountKeys_ListWorkspaceKeys() // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + string workspaceName = "testworkspace"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - // invoke the operation - MachineLearningWorkspaceGetStorageAccountKeysResult result = await machineLearningWorkspace.GetStorageAccountKeysAsync(); + // invoke the operation and iterate over the result + await foreach (MachineLearningFqdnEndpoints item in machineLearningWorkspace.GetOutboundNetworkDependenciesEndpointsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine($"Succeeded"); } - // List Workspace Keys + // Prepare Notebook [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetNotebookKeys_ListWorkspaceKeys() + public async Task PrepareNotebook_PrepareNotebook() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/listKeys.json - // this example is just showing the usage of "Workspaces_ListNotebookKeys" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Notebook/prepare.json + // this example is just showing the usage of "Workspaces_PrepareNotebook" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -366,18 +398,19 @@ public async Task GetNotebookKeys_ListWorkspaceKeys() MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); // invoke the operation - MachineLearningWorkspaceGetNotebookKeysResult result = await machineLearningWorkspace.GetNotebookKeysAsync(); + ArmOperation lro = await machineLearningWorkspace.PrepareNotebookAsync(WaitUntil.Completed); + MachineLearningNotebookResourceInfo result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } - // ListOutboundNetworkDependenciesEndpoints + // Resync Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDependenciesEndpoints() + public async Task ResyncKeys_ResyncWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ExternalFQDN/get.json - // this example is just showing the usage of "Workspaces_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Workspace/resyncKeys.json + // this example is just showing the usage of "Workspaces_ResyncKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -386,17 +419,14 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDep // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "workspace-1234"; - string workspaceName = "testworkspace"; + string subscriptionId = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; + string resourceGroupName = "testrg123"; + string workspaceName = "workspaces123"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - // invoke the operation and iterate over the result - await foreach (MachineLearningFqdnEndpoints item in machineLearningWorkspace.GetOutboundNetworkDependenciesEndpointsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + await machineLearningWorkspace.ResyncKeysAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -406,7 +436,7 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDep [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_WorkspaceListPrivateLinkResources() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateLinkResource/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/PrivateLinkResource/list.json // this example is just showing the usage of "PrivateLinkResources_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -431,13 +461,13 @@ public async Task GetPrivateLinkResources_WorkspaceListPrivateLinkResources() Console.WriteLine($"Succeeded"); } - // List Workspace features + // Provision ManagedNetwork [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetWorkspaceFeatures_ListWorkspaceFeatures() + public async Task ProvisionManagedNetworkManagedNetworkProvision_ProvisionManagedNetwork() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceFeature/list.json - // this example is just showing the usage of "WorkspaceFeatures_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/ManagedNetwork/provision.json + // this example is just showing the usage of "ManagedNetworkProvisions_ProvisionManagedNetwork" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -446,19 +476,21 @@ public async Task GetWorkspaceFeatures_ListWorkspaceFeatures() // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string workspaceName = "testworkspace"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "test-rg"; + string workspaceName = "aml-workspace-name"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - // invoke the operation and iterate over the result - await foreach (MachineLearningUserFeature item in machineLearningWorkspace.GetWorkspaceFeaturesAsync()) + // invoke the operation + ManagedNetworkProvisionContent content = new ManagedNetworkProvisionContent() { - Console.WriteLine($"Succeeded: {item}"); - } + IncludeSpark = false, + }; + ArmOperation lro = await machineLearningWorkspace.ProvisionManagedNetworkManagedNetworkProvisionAsync(WaitUntil.Completed, content: content); + ManagedNetworkProvisionStatus result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 9b1526ced6e81..a319959e02649 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -23,7 +23,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMachineLearningUsages_ListUsages() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Usage/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Usage/list.json // this example is just showing the usage of "Usages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetMachineLearningUsages_ListUsages() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMachineLearningVmSizes_ListVMSizes() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/VirtualMachineSize/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/VirtualMachineSize/list.json // this example is just showing the usage of "VirtualMachineSizes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task GetMachineLearningVmSizes_ListVMSizes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateMachineLearningQuotas_UpdateQuotas() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Quota/update.json // this example is just showing the usage of "Quotas_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task UpdateMachineLearningQuotas_UpdateQuotas() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMachineLearningQuotas_ListWorkspaceQuotasByVMFamily() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2023-06-01-preview/examples/Quota/list.json // this example is just showing the usage of "Quotas_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Extensions/MachineLearningExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Extensions/MachineLearningExtensions.cs new file mode 100644 index 0000000000000..1b08c5ad790ba --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Extensions/MachineLearningExtensions.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using System.Threading; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class to add extension methods to Azure.ResourceManager.MachineLearning. + public static partial class MachineLearningExtensions + { + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token for pagination. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AsyncPageable GetMachineLearningWorkspacesAsync(this SubscriptionResource subscriptionResource, string skip, CancellationToken cancellationToken) + => GetMachineLearningWorkspacesAsync(subscriptionResource, skip, null, cancellationToken); + + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Pageable GetMachineLearningWorkspaces(this SubscriptionResource subscriptionResource, string skip, CancellationToken cancellationToken) + => GetMachineLearningWorkspaces(subscriptionResource, skip, null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningCodeVersionCollection.cs new file mode 100644 index 0000000000000..5e22ea48f1ab2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningCodeVersionCollection.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningCodeVersions method from an instance of . + /// + public partial class MachineLearningCodeVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions + /// + /// + /// Operation Id + /// CodeVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string orderBy, int? top, string skip, CancellationToken cancellationToken) => GetAllAsync(orderBy, top, skip, null, null, cancellationToken); + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions + /// + /// + /// Operation Id + /// CodeVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string orderBy, int? top, string skip, CancellationToken cancellationToken) => GetAll(orderBy, top, skip, null, null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningComponentVersionCollection.cs new file mode 100644 index 0000000000000..9566800156b02 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningComponentVersionCollection.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using System.Threading; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningComponentVersions method from an instance of . + /// + public partial class MachineLearningComponentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + /// + /// List component versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions + /// + /// + /// Operation Id + /// ComponentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAllAsync(orderBy, top, skip, listViewType, null, cancellationToken); + + /// + /// List component versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions + /// + /// + /// Operation Id + /// ComponentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAll(orderBy, top, skip, listViewType, null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDataVersionCollection.cs new file mode 100644 index 0000000000000..5eb65646106d7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDataVersionCollection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using System.Threading; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningDataVersions method from an instance of . + /// + public partial class MachineLearningDataVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + /// + /// List data versions in the data container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions + /// + /// + /// Operation Id + /// DataVersions_List + /// + /// + /// + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAllAsync(new MachineLearningDataVersionCollectionGetAllOptions() { OrderBy = orderBy, Top = top, Skip = skip, Tags = tags, ListViewType = listViewType, Stage = null}, cancellationToken); + + /// + /// List data versions in the data container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions + /// + /// + /// Operation Id + /// DataVersions_List + /// + /// + /// + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAll(new MachineLearningDataVersionCollectionGetAllOptions() { OrderBy = orderBy, Top = top, Skip = skip, Tags = tags, ListViewType = listViewType, Stage = null}, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningEnvironmentVersionCollection.cs new file mode 100644 index 0000000000000..6894a0327a225 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningEnvironmentVersionCollection.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using System.Threading; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningEnvironmentVersions method from an instance of . + /// + public partial class MachineLearningEnvironmentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions + /// + /// + /// Operation Id + /// EnvironmentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAllAsync(orderBy, top, skip, listViewType, null, cancellationToken); + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions + /// + /// + /// Operation Id + /// EnvironmentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAll(orderBy, top, skip, listViewType, null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobCollection.cs new file mode 100644 index 0000000000000..a18ddf043e660 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobCollection.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using System.Threading; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningJobs method from an instance of . + /// + public partial class MachineLearningJobCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + /// + /// Lists Jobs in the workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs + /// + /// + /// Operation Id + /// Jobs_List + /// + /// + /// + /// Continuation token for pagination. + /// Type of job to be returned. + /// Jobs returned will have this tag key. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string skip, string jobType, string tag, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAllAsync(new MachineLearningJobCollectionGetAllOptions() { Skip = skip, JobType = jobType, Tag = tag, ListViewType = listViewType, AssetName = null, Scheduled = null, ScheduleId = null }, cancellationToken); + + /// + /// Lists Jobs in the workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs + /// + /// + /// Operation Id + /// Jobs_List + /// + /// + /// + /// Continuation token for pagination. + /// Type of job to be returned. + /// Jobs returned will have this tag key. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string skip, string jobType, string tag, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAll(new MachineLearningJobCollectionGetAllOptions() { Skip = skip, JobType = jobType, Tag = tag, ListViewType = listViewType, AssetName = null, Scheduled = null, ScheduleId = null }, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobResource.cs new file mode 100644 index 0000000000000..435863f96d3d3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningJobResource.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningJob along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningJobResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningJob method. + /// + public partial class MachineLearningJobResource : ArmResource + { + /// + /// Creates and executes a Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id} + /// + /// + /// Operation Id + /// Jobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Job definition object. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningJobData data, CancellationToken cancellationToken) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningJobJobsClientDiagnostics.CreateScope("MachineLearningJobResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningJobJobsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningJobResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates and executes a Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id} + /// + /// + /// Operation Id + /// Jobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Job definition object. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningJobJobsClientDiagnostics.CreateScope("MachineLearningJobResource.Update"); + scope.Start(); + try + { + var response = _machineLearningJobJobsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningJobResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningModelVersionCollection.cs index f2d70cab49097..f30c5f1ecedd6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningModelVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningModelVersionCollection.cs @@ -1,15 +1,20 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; +#nullable disable + using System.Collections.Generic; -using System.Text; -using Azure.ResourceManager.MachineLearning.Models; using System.Threading; +using Azure.ResourceManager.MachineLearning.Models; namespace Azure.ResourceManager.MachineLearning { - public partial class MachineLearningModelVersionCollection + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningModelVersions method from an instance of . + /// + public partial class MachineLearningModelVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable { /// /// List model versions. @@ -36,22 +41,8 @@ public partial class MachineLearningModelVersionCollection /// View type for including/excluding (for example) archived entities. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - MachineLearningModelVersionCollectionGetAllOptions options = new MachineLearningModelVersionCollectionGetAllOptions(); - options.Skip = skip; - options.OrderBy = orderBy; - options.Top = top; - options.Version = version; - options.Description = description; - options.Offset = offset; - options.Tags = tags; - options.Properties = properties; - options.Feed = feed; - options.ListViewType = listViewType; - - return GetAllAsync(options, cancellationToken); - } + public virtual AsyncPageable GetAllAsync(string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAllAsync(new MachineLearningModelVersionCollectionGetAllOptions() { Skip = skip, OrderBy = orderBy, Top = top, Version = version, Description = description, Offset = offset, Tags = tags, Properties = properties, Feed = feed, ListViewType = listViewType, Stage = null }, cancellationToken); /// /// List model versions. @@ -78,21 +69,7 @@ public virtual AsyncPageable GetAllAsync(st /// View type for including/excluding (for example) archived entities. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - MachineLearningModelVersionCollectionGetAllOptions options = new MachineLearningModelVersionCollectionGetAllOptions(); - options.Skip = skip; - options.OrderBy = orderBy; - options.Top = top; - options.Version = version; - options.Description = description; - options.Offset = offset; - options.Tags = tags; - options.Properties = properties; - options.Feed = feed; - options.ListViewType = listViewType; - - return GetAll(options, cancellationToken); - } + public virtual Pageable GetAll(string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType, CancellationToken cancellationToken) + => GetAll(new MachineLearningModelVersionCollectionGetAllOptions() { Skip = skip, OrderBy = orderBy, Top = top, Version = version, Description = description, Offset = offset, Tags = tags, Properties = properties, Feed = feed, ListViewType = listViewType, Stage = null }, cancellationToken); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceCollection.cs new file mode 100644 index 0000000000000..b5d2e0221cadd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceCollection.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using System.Threading; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningWorkspaces method from an instance of . + /// + public partial class MachineLearningWorkspaceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + /// + /// Lists all the available machine learning workspaces under the specified resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListByResourceGroup + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string skip, CancellationToken cancellationToken) + => GetAllAsync(skip, null, cancellationToken); + + /// + /// Lists all the available machine learning workspaces under the specified resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListByResourceGroup + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string skip, CancellationToken cancellationToken) + => GetAll(skip, null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionResource.cs new file mode 100644 index 0000000000000..58db479559f63 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionResource.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningWorkspaceConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningWorkspaceConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningWorkspaceConnection method. + /// + public partial class MachineLearningWorkspaceConnectionResource : ArmResource + { + /// + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// + /// + /// Operation Id + /// WorkspaceConnections_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// + /// + /// Operation Id + /// WorkspaceConnections_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceData.cs new file mode 100644 index 0000000000000..45a77a52bb09c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceData.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningWorkspace data model. + /// An object that represents a machine learning workspace. + /// + public partial class MachineLearningWorkspaceData : TrackedResourceData + { + [EditorBrowsable(EditorBrowsableState.Never)] + public MachineLearningPublicNetworkAccess? PublicNetworkAccess + { + get + { + return PublicNetworkAccessType.ToString(); + } + set + { + PublicNetworkAccessType = value.ToString(); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceResource.cs new file mode 100644 index 0000000000000..05ae0239a9997 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceResource.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningWorkspace along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningWorkspaceResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningWorkspace method. + /// + public partial class MachineLearningWorkspaceResource : ArmResource + { + /// + /// Deletes a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} + /// + /// + /// Operation Id + /// Workspaces_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken) + => await DeleteAsync(waitUntil, null, cancellationToken).ConfigureAwait(false); + + /// + /// Deletes a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} + /// + /// + /// Operation Id + /// Workspaces_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken) + => Delete(waitUntil, null, cancellationToken); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/ComputeSchedules.Serialization.cs similarity index 96% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/ComputeSchedules.Serialization.cs index 54abed101a0e1..7bf017c36f4fe 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/ComputeSchedules.Serialization.cs @@ -1,14 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.Collections.Generic; using System.Text.Json; using Azure.Core; +[assembly: CodeGenSuppressType("ComputeSchedules")] namespace Azure.ResourceManager.MachineLearning.Models { internal partial class ComputeSchedules diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/ComputeSchedules.cs similarity index 95% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/ComputeSchedules.cs index c10f7b1401dad..84ba7477a9cfc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/ComputeSchedules.cs @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System.Collections.Generic; using Azure.Core; +[assembly: CodeGenSuppressType("ComputeSchedules")] namespace Azure.ResourceManager.MachineLearning.Models { /// The list of schedules to be applied on the computes. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/EncryptionUpdateProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/EncryptionUpdateProperties.cs new file mode 100644 index 0000000000000..83a7db9751179 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/EncryptionUpdateProperties.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The EncryptionUpdateProperties. + public partial class EncryptionUpdateProperties + { + /// Initializes a new instance of EncryptionUpdateProperties. + /// + public EncryptionUpdateProperties(string keyIdentifier) + { + KeyVaultProperties = new EncryptionKeyVaultUpdateProperties(keyIdentifier); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs new file mode 100644 index 0000000000000..a72b3c014dfd0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningComputeStartStopSchedule.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Compute start stop schedule properties. + public partial class MachineLearningComputeStartStopSchedule + { + /// Required if triggerType is Recurrence. + [EditorBrowsable(EditorBrowsableState.Never)] + public MachineLearningRecurrenceTrigger Recurrence + { + get + { + return new MachineLearningRecurrenceTrigger(RecurrenceSchedule.Frequency.Value, RecurrenceSchedule.Interval.Value); + } + } + /// Required if triggerType is Cron. + [EditorBrowsable(EditorBrowsableState.Never)] + public CronTrigger Cron + { + get + { + return new CronTrigger(CronSchedule.Expression); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionKeyVaultProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionKeyVaultProperties.cs new file mode 100644 index 0000000000000..e794d52a17532 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionKeyVaultProperties.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningEncryptionKeyVaultProperties. + public partial class MachineLearningEncryptionKeyVaultProperties + { + /// Initializes a new instance of MachineLearningEncryptionKeyVaultProperties. + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Key vault uri to access the encryption key. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier) + { + Argument.AssertNotNull(keyVaultArmId, nameof(keyVaultArmId)); + Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); + + KeyVaultArmId = keyVaultArmId; + KeyIdentifier = keyIdentifier; + } + + /// Initializes a new instance of MachineLearningEncryptionKeyVaultProperties. + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Key vault uri to access the encryption key. + /// For future use - The client id of the identity which will be used to access key vault. + [EditorBrowsable(EditorBrowsableState.Never)] + internal MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier, string identityClientId) + { + KeyVaultArmId = keyVaultArmId; + KeyIdentifier = keyIdentifier; + IdentityClientId = identityClientId; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionSetting.cs new file mode 100644 index 0000000000000..4ae628815b919 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionSetting.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningEncryptionSetting. + public partial class MachineLearningEncryptionSetting + { + /// Initializes a new instance of MachineLearningEncryptionSetting. + /// Indicates whether or not the encryption is enabled for the workspace. + /// Customer Key vault properties. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public MachineLearningEncryptionSetting(MachineLearningEncryptionStatus status, MachineLearningEncryptionKeyVaultProperties keyVaultProperties) + { + Argument.AssertNotNull(keyVaultProperties, nameof(keyVaultProperties)); + + Status = status; + KeyVaultProperties = keyVaultProperties; + } + + /// Initializes a new instance of MachineLearningEncryptionSetting. + /// Indicates whether or not the encryption is enabled for the workspace. + /// The identity that will be used to access the key vault for encryption at rest. + /// Customer Key vault properties. + [EditorBrowsable(EditorBrowsableState.Never)] + internal MachineLearningEncryptionSetting(MachineLearningEncryptionStatus status, MachineLearningCmkIdentity identity, MachineLearningEncryptionKeyVaultProperties keyVaultProperties) + { + Status = status; + Identity = identity; + KeyVaultProperties = keyVaultProperties; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPartialManagedServiceIdentity.Serialization.cs similarity index 100% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPartialManagedServiceIdentity.Serialization.cs diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPartialManagedServiceIdentity.cs similarity index 100% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPartialManagedServiceIdentity.cs diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPublicNetworkAccess.cs similarity index 99% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccess.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPublicNetworkAccess.cs index f5bbf9a2dd77a..a1692384daf1b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccess.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPublicNetworkAccess.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningValueFormat.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningValueFormat.cs similarity index 97% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningValueFormat.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningValueFormat.cs index 2c9bccea26a6b..589a1a147242d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningValueFormat.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningValueFormat.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -11,6 +9,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// format for the workspace connection value. + [EditorBrowsable(EditorBrowsableState.Never)] public readonly partial struct MachineLearningValueFormat : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspaceConnectionProperties.cs new file mode 100644 index 0000000000000..a873d2d0557fe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspaceConnectionProperties.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceConnectionProperties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public abstract partial class MachineLearningWorkspaceConnectionProperties + { + /// Value details of the workspace connection. + [EditorBrowsable(EditorBrowsableState.Never)] + public string Value { get; set; } + /// format for the workspace connection value. + [EditorBrowsable(EditorBrowsableState.Never)] + public MachineLearningValueFormat? ValueFormat { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspacePatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspacePatch.cs new file mode 100644 index 0000000000000..319bdf1b4fd9e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningWorkspacePatch.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The parameters for updating a machine learning workspace. + public partial class MachineLearningWorkspacePatch + { + [EditorBrowsable(EditorBrowsableState.Never)] + public MachineLearningPublicNetworkAccess? PublicNetworkAccess + { + get + { + return PublicNetworkAccessType.ToString(); + } + set + { + PublicNetworkAccessType = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs index cef7bc88fb526..62cd0d038f95c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs @@ -19,192 +19,6 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Model factory for models. public static partial class ArmMachineLearningModelFactory { - /// Initializes a new instance of MachineLearningError. - /// The error object. - /// A new instance for mocking. - public static MachineLearningError MachineLearningError(ResponseError error = null) - { - return new MachineLearningError(error); - } - - /// Initializes a new instance of MachineLearningWorkspaceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The identity of the resource. - /// The sku of the workspace. - /// The immutable id associated with this workspace. - /// The description of this workspace. - /// The friendly name for this workspace. This name in mutable. - /// 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. - /// ARM id of the container registry associated with this workspace. - /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. - /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. - /// The encryption settings of Azure ML workspace. - /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. - /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. - /// Count of private connections in the workspace. - /// The compute name for image build. - /// The flag to indicate whether to allow public access when behind VNet. - /// Whether requests from Public Network are allowed. - /// The list of private endpoint connections in the workspace. - /// The list of shared private link resources in this workspace. - /// The notebook info of Azure ML workspace. - /// The service managed resource settings. - /// The user assigned identity resource id that represents the workspace identity. - /// The tenant id associated with this workspace. - /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. - /// The URI associated with this workspace that machine learning flow must point at to set up tracking. - /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - /// A new instance for mocking. - public static MachineLearningWorkspaceData MachineLearningWorkspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, string workspaceId = null, string description = null, string friendlyName = null, string keyVault = null, string applicationInsights = null, string containerRegistry = null, string storageAccount = null, Uri discoveryUri = null, MachineLearningProvisioningState? provisioningState = null, MachineLearningEncryptionSetting encryption = null, bool? isHbiWorkspace = null, string serviceProvisionedResourceGroup = null, int? privateLinkCount = null, string imageBuildCompute = null, bool? allowPublicAccessWhenBehindVnet = null, MachineLearningPublicNetworkAccess? publicNetworkAccess = null, IEnumerable privateEndpointConnections = null, IEnumerable sharedPrivateLinkResources = null, MachineLearningNotebookResourceInfo notebookInfo = null, int? cosmosDbCollectionsThroughput = null, string primaryUserAssignedIdentity = null, Guid? tenantId = null, bool? isStorageHnsEnabled = null, Uri mlFlowTrackingUri = null, bool? isV1LegacyMode = null) - { - tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); - sharedPrivateLinkResources ??= new List(); - - return new MachineLearningWorkspaceData(id, name, resourceType, systemData, tags, location, identity, sku, workspaceId, description, friendlyName, keyVault, applicationInsights, containerRegistry, storageAccount, discoveryUri, provisioningState, encryption, isHbiWorkspace, serviceProvisionedResourceGroup, privateLinkCount, imageBuildCompute, allowPublicAccessWhenBehindVnet, publicNetworkAccess, privateEndpointConnections?.ToList(), sharedPrivateLinkResources?.ToList(), notebookInfo, cosmosDbCollectionsThroughput != null ? new ServiceManagedResourcesSettings(new CosmosDbSettings(cosmosDbCollectionsThroughput)) : null, primaryUserAssignedIdentity, tenantId, isStorageHnsEnabled, mlFlowTrackingUri, isV1LegacyMode); - } - - /// Initializes a new instance of MachineLearningPrivateEndpointConnectionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The identity of the resource. - /// The sku of the workspace. - /// The resource of private end point. - /// A collection of information about the state of the connection between service consumer and provider. - /// The provisioning state of the private endpoint connection resource. - /// A new instance for mocking. - public static MachineLearningPrivateEndpointConnectionData MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, MachineLearningPrivateEndpoint privateEndpoint = null, MachineLearningPrivateLinkServiceConnectionState connectionState = null, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = null) - { - tags ??= new Dictionary(); - - return new MachineLearningPrivateEndpointConnectionData(id, name, resourceType, systemData, tags, location, identity, sku, privateEndpoint, connectionState, provisioningState); - } - - /// Initializes a new instance of MachineLearningPrivateEndpoint. - /// The ARM identifier for Private Endpoint. - /// The ARM identifier for Subnet resource that private endpoint links to. - /// A new instance for mocking. - public static MachineLearningPrivateEndpoint MachineLearningPrivateEndpoint(ResourceIdentifier id = null, ResourceIdentifier subnetArmId = null) - { - return new MachineLearningPrivateEndpoint(id, subnetArmId); - } - - /// Initializes a new instance of MachineLearningNotebookResourceInfo. - /// - /// the data plane resourceId that used to initialize notebook component. - /// The error that occurs when preparing notebook. - /// A new instance for mocking. - public static MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, string resourceId = null, MachineLearningNotebookPreparationError notebookPreparationError = null) - { - return new MachineLearningNotebookResourceInfo(fqdn, resourceId, notebookPreparationError); - } - - /// Initializes a new instance of MachineLearningNotebookPreparationError. - /// - /// - /// A new instance for mocking. - public static MachineLearningNotebookPreparationError MachineLearningNotebookPreparationError(string errorMessage = null, int? statusCode = null) - { - return new MachineLearningNotebookPreparationError(errorMessage, statusCode); - } - - /// Initializes a new instance of MachineLearningWorkspaceDiagnoseResult. - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceDiagnoseResult MachineLearningWorkspaceDiagnoseResult(MachineLearningDiagnoseResultValue value = null) - { - return new MachineLearningWorkspaceDiagnoseResult(value); - } - - /// Initializes a new instance of MachineLearningDiagnoseResultValue. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningDiagnoseResultValue MachineLearningDiagnoseResultValue(IEnumerable userDefinedRouteResults = null, IEnumerable networkSecurityRuleResults = null, IEnumerable resourceLockResults = null, IEnumerable dnsResolutionResults = null, IEnumerable storageAccountResults = null, IEnumerable keyVaultResults = null, IEnumerable containerRegistryResults = null, IEnumerable applicationInsightsResults = null, IEnumerable otherResults = null) - { - userDefinedRouteResults ??= new List(); - networkSecurityRuleResults ??= new List(); - resourceLockResults ??= new List(); - dnsResolutionResults ??= new List(); - storageAccountResults ??= new List(); - keyVaultResults ??= new List(); - containerRegistryResults ??= new List(); - applicationInsightsResults ??= new List(); - otherResults ??= new List(); - - return new MachineLearningDiagnoseResultValue(userDefinedRouteResults?.ToList(), networkSecurityRuleResults?.ToList(), resourceLockResults?.ToList(), dnsResolutionResults?.ToList(), storageAccountResults?.ToList(), keyVaultResults?.ToList(), containerRegistryResults?.ToList(), applicationInsightsResults?.ToList(), otherResults?.ToList()); - } - - /// Initializes a new instance of MachineLearningDiagnoseResult. - /// Code for workspace setup error. - /// Level of workspace setup error. - /// Message of workspace setup error. - /// A new instance for mocking. - public static MachineLearningDiagnoseResult MachineLearningDiagnoseResult(string code = null, MachineLearningDiagnoseResultLevel? level = null, string message = null) - { - return new MachineLearningDiagnoseResult(code, level, message); - } - - /// Initializes a new instance of MachineLearningWorkspaceGetKeysResult. - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string userStorageKey = null, string userStorageResourceId = null, string appInsightsInstrumentationKey = null, MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null) - { - return new MachineLearningWorkspaceGetKeysResult(userStorageKey, userStorageResourceId, appInsightsInstrumentationKey, containerRegistryCredentials, notebookAccessKeys); - } - - /// Initializes a new instance of MachineLearningContainerRegistryCredentials. - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(AzureLocation? location = null, string username = null, IEnumerable passwords = null) - { - passwords ??= new List(); - - return new MachineLearningContainerRegistryCredentials(location, username, passwords?.ToList()); - } - - /// Initializes a new instance of MachineLearningPasswordDetail. - /// - /// - /// A new instance for mocking. - public static MachineLearningPasswordDetail MachineLearningPasswordDetail(string name = null, string value = null) - { - return new MachineLearningPasswordDetail(name, value); - } - - /// Initializes a new instance of MachineLearningWorkspaceGetNotebookKeysResult. - /// - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceGetNotebookKeysResult MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey = null, string secondaryAccessKey = null) - { - return new MachineLearningWorkspaceGetNotebookKeysResult(primaryAccessKey, secondaryAccessKey); - } - /// Initializes a new instance of MachineLearningUsage. /// Specifies the resource ID. /// Region of the AML workspace in the id. @@ -228,6 +42,14 @@ public static MachineLearningUsageName MachineLearningUsageName(string value = n return new MachineLearningUsageName(value, localizedValue); } + /// Initializes a new instance of MachineLearningError. + /// The error object. + /// A new instance for mocking. + public static MachineLearningError MachineLearningError(ResponseError error = null) + { + return new MachineLearningError(error); + } + /// Initializes a new instance of MachineLearningVmSize. /// The name of the virtual machine size. /// The family name of the virtual machine size. @@ -358,280 +180,106 @@ public static AmlComputeNodeInformation AmlComputeNodeInformation(string nodeId return new AmlComputeNodeInformation(nodeId, privateIPAddress, publicIPAddress, port, nodeState, runId); } - /// Initializes a new instance of MachineLearningWorkspaceNotebookAccessTokenResult. - /// - /// - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string notebookResourceId = null, string hostName = null, string publicDns = null, string accessToken = null, string tokenType = null, int? expiresIn = null, string refreshToken = null, string scope = null) - { - return new MachineLearningWorkspaceNotebookAccessTokenResult(notebookResourceId, hostName, publicDns, accessToken, tokenType, expiresIn, refreshToken, scope); - } - - /// Initializes a new instance of MachineLearningPrivateLinkResource. + /// Initializes a new instance of MachineLearningCodeContainerData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// The identity of the resource. - /// The sku of the workspace. - /// The private link resource group id. - /// The private link resource required member names. - /// The private link resource Private link DNS zone name. - /// A new instance for mocking. - public static MachineLearningPrivateLinkResource MachineLearningPrivateLinkResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningCodeContainerData MachineLearningCodeContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeContainerProperties properties = null) + { + return new MachineLearningCodeContainerData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningCodeContainerProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the code container. + /// A new instance for mocking. + public static MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { + properties ??= new Dictionary(); tags ??= new Dictionary(); - requiredMembers ??= new List(); - requiredZoneNames ??= new List(); - return new MachineLearningPrivateLinkResource(id, name, resourceType, systemData, tags, location, identity, sku, groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); + return new MachineLearningCodeContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion, provisioningState); } - /// Initializes a new instance of MachineLearningWorkspaceGetStorageAccountKeysResult. - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceGetStorageAccountKeysResult MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey = null) + /// Initializes a new instance of MachineLearningAssetContainer. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// A new instance for mocking. + public static MachineLearningAssetContainer MachineLearningAssetContainer(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) { - return new MachineLearningWorkspaceGetStorageAccountKeysResult(userStorageKey); + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new MachineLearningAssetContainer(description, properties, tags, isArchived, latestVersion, nextVersion); } - /// Initializes a new instance of MachineLearningWorkspaceConnectionData. + /// Initializes a new instance of MachineLearningCodeVersionData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceConnectionData MachineLearningWorkspaceConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningWorkspaceConnectionProperties properties = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningCodeVersionData MachineLearningCodeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeVersionProperties properties = null) { - return new MachineLearningWorkspaceConnectionData(id, name, resourceType, systemData, properties); + return new MachineLearningCodeVersionData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of MachineLearningFqdnEndpoints. - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpoints MachineLearningFqdnEndpoints(MachineLearningFqdnEndpointsProperties properties = null) + /// Initializes a new instance of MachineLearningCodeVersionProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// Uri where code is located. + /// Provisioning state for the code version. + /// A new instance for mocking. + public static MachineLearningCodeVersionProperties MachineLearningCodeVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = null, bool? isArchived = null, Uri codeUri = null, RegistryAssetProvisioningState? provisioningState = null) { - return new MachineLearningFqdnEndpoints(properties); + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new MachineLearningCodeVersionProperties(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, codeUri, provisioningState); } - /// Initializes a new instance of MachineLearningFqdnEndpointsProperties. - /// - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpointsProperties MachineLearningFqdnEndpointsProperties(string category = null, IEnumerable endpoints = null) - { - endpoints ??= new List(); - - return new MachineLearningFqdnEndpointsProperties(category, endpoints?.ToList()); - } - - /// Initializes a new instance of MachineLearningFqdnEndpoint. - /// - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpoint MachineLearningFqdnEndpoint(string domainName = null, IEnumerable endpointDetails = null) - { - endpointDetails ??= new List(); - - return new MachineLearningFqdnEndpoint(domainName, endpointDetails?.ToList()); - } - - /// Initializes a new instance of MachineLearningFqdnEndpointDetail. - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpointDetail MachineLearningFqdnEndpointDetail(int? port = null) - { - return new MachineLearningFqdnEndpointDetail(port); - } - - /// Initializes a new instance of MachineLearningBatchEndpointData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - /// [Required] Additional attributes of the entity. - /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningBatchEndpointData MachineLearningBatchEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningBatchEndpointProperties properties = null, MachineLearningSku sku = null) - { - tags ??= new Dictionary(); - - return new MachineLearningBatchEndpointData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); - } - - /// Initializes a new instance of MachineLearningBatchEndpointProperties. - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - /// Description of the inference endpoint. - /// - /// EndpointAuthKeys to set initially on an Endpoint. - /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - /// - /// Property dictionary. Properties can be added, but not removed or altered. - /// Endpoint URI. - /// Endpoint Swagger URI. - /// Default values for Batch Endpoint. - /// Provisioning state for the endpoint. - /// A new instance for mocking. - public static MachineLearningBatchEndpointProperties MachineLearningBatchEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, string defaultsDeploymentName = null, MachineLearningEndpointProvisioningState? provisioningState = null) - { - properties ??= new Dictionary(); - - return new MachineLearningBatchEndpointProperties(authMode, description, keys, properties, scoringUri, swaggerUri, defaultsDeploymentName != null ? new BatchEndpointDefaults(defaultsDeploymentName) : null, provisioningState); - } - - /// Initializes a new instance of MachineLearningEndpointProperties. - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - /// Description of the inference endpoint. - /// - /// EndpointAuthKeys to set initially on an Endpoint. - /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - /// - /// Property dictionary. Properties can be added, but not removed or altered. - /// Endpoint URI. - /// Endpoint Swagger URI. - /// A new instance for mocking. - public static MachineLearningEndpointProperties MachineLearningEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null) - { - properties ??= new Dictionary(); - - return new MachineLearningEndpointProperties(authMode, description, keys, properties, scoringUri, swaggerUri); - } - - /// Initializes a new instance of MachineLearningBatchDeploymentData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - /// [Required] Additional attributes of the entity. - /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningBatchDeploymentData MachineLearningBatchDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningBatchDeploymentProperties properties = null, MachineLearningSku sku = null) + /// Initializes a new instance of PendingUploadResponseDto. + /// Container level read, write, list SAS. + /// ID for this upload request. + /// TemporaryBlobReference is the only supported type. + /// A new instance for mocking. + public static PendingUploadResponseDto PendingUploadResponseDto(BlobReferenceForConsumptionDto blobReferenceForConsumption = null, string pendingUploadId = null, PendingUploadType? pendingUploadType = null) { - tags ??= new Dictionary(); - - return new MachineLearningBatchDeploymentData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); + return new PendingUploadResponseDto(blobReferenceForConsumption, pendingUploadId, pendingUploadType); } - /// Initializes a new instance of MachineLearningBatchDeploymentProperties. - /// Code configuration for the endpoint deployment. - /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. - /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. - /// Compute target for batch inference operation. - /// - /// Error threshold, if the error count for the entire input goes above this value, - /// the batch inference will be aborted. Range is [-1, int.MaxValue]. - /// For FileDataset, this value is the count of file failures. - /// For TabularDataset, this value is the count of record failures. - /// If set to -1 (the lower bound), all failures during batch inference will be ignored. - /// - /// Logging level for batch inference operation. - /// Indicates maximum number of parallelism per instance. - /// - /// 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. - /// - /// - /// Reference to the model asset for the endpoint deployment. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Indicates how the output will be organized. - /// Customized output file name for append_row output action. - /// Provisioning state for the endpoint deployment. - /// - /// Indicates compute configuration for the job. - /// If not provided, will default to the defaults defined in ResourceConfiguration. + /// Initializes a new instance of BlobReferenceForConsumptionDto. + /// + /// Blob URI path for client to upload data. + /// Example: https://blob.windows.core.net/Container/Path /// - /// - /// Retry Settings for the batch inference operation. - /// If not provided, will default to the defaults defined in BatchRetrySettings. + /// + /// Credential info to access storage account + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . /// - /// A new instance for mocking. - public static MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, string compute = null, int? errorThreshold = null, MachineLearningBatchLoggingLevel? loggingLevel = null, int? maxConcurrencyPerInstance = null, long? miniBatchSize = null, MachineLearningAssetReferenceBase model = null, MachineLearningBatchOutputAction? outputAction = null, string outputFileName = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningDeploymentResourceConfiguration resources = null, MachineLearningBatchRetrySettings retrySettings = null) - { - environmentVariables ??= new Dictionary(); - properties ??= new Dictionary(); - - return new MachineLearningBatchDeploymentProperties(codeConfiguration, description, environmentId, environmentVariables, properties, compute, errorThreshold, loggingLevel, maxConcurrencyPerInstance, miniBatchSize, model, outputAction, outputFileName, provisioningState, resources, retrySettings); - } - - /// Initializes a new instance of MachineLearningCodeContainerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningCodeContainerData MachineLearningCodeContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeContainerProperties properties = null) - { - return new MachineLearningCodeContainerData(id, name, resourceType, systemData, properties); - } - - /// Initializes a new instance of MachineLearningCodeContainerProperties. - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// A new instance for mocking. - public static MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) - { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - - return new MachineLearningCodeContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion); - } - - /// Initializes a new instance of MachineLearningAssetContainer. - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// A new instance for mocking. - public static MachineLearningAssetContainer MachineLearningAssetContainer(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) - { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - - return new MachineLearningAssetContainer(description, properties, tags, isArchived, latestVersion, nextVersion); - } - - /// Initializes a new instance of MachineLearningCodeVersionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningCodeVersionData MachineLearningCodeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeVersionProperties properties = null) + /// Arm ID of the storage account to use. + /// A new instance for mocking. + public static BlobReferenceForConsumptionDto BlobReferenceForConsumptionDto(Uri blobUri = null, PendingUploadCredentialDto credential = null, ResourceIdentifier storageAccountArmId = null) { - return new MachineLearningCodeVersionData(id, name, resourceType, systemData, properties); + return new BlobReferenceForConsumptionDto(blobUri, credential, storageAccountArmId); } /// Initializes a new instance of MachineLearningComponentContainerData. @@ -653,13 +301,14 @@ public static MachineLearningComponentContainerData MachineLearningComponentCont /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. + /// Provisioning state for the component container. /// A new instance for mocking. - public static MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) + public static MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - return new MachineLearningComponentContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion); + return new MachineLearningComponentContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion, provisioningState); } /// Initializes a new instance of MachineLearningComponentVersionData. @@ -674,6 +323,28 @@ public static MachineLearningComponentVersionData MachineLearningComponentVersio return new MachineLearningComponentVersionData(id, name, resourceType, systemData, properties); } + /// Initializes a new instance of MachineLearningComponentVersionProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// + /// Defines Component definition details. + /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> + /// + /// Provisioning state for the component version. + /// Stage in the component lifecycle. + /// A new instance for mocking. + public static MachineLearningComponentVersionProperties MachineLearningComponentVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = null, bool? isArchived = null, BinaryData componentSpec = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new MachineLearningComponentVersionProperties(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, componentSpec, provisioningState, stage); + } + /// Initializes a new instance of MachineLearningDataContainerData. /// The id. /// The name. @@ -719,42 +390,6 @@ public static MachineLearningDataVersionData MachineLearningDataVersionData(Reso return new MachineLearningDataVersionData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of MachineLearningDatastoreData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// A new instance for mocking. - public static MachineLearningDatastoreData MachineLearningDatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDatastoreProperties properties = null) - { - return new MachineLearningDatastoreData(id, name, resourceType, systemData, properties); - } - - /// Initializes a new instance of MachineLearningDatastoreProperties. - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Account credentials. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. - /// A new instance for mocking. - public static MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, string datastoreType = "Unknown", bool? isDefault = null) - { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - - return new MachineLearningDatastoreProperties(description, properties, tags, credentials, datastoreType, isDefault); - } - /// Initializes a new instance of MachineLearningEnvironmentContainerData. /// The id. /// The name. @@ -774,13 +409,14 @@ public static MachineLearningEnvironmentContainerData MachineLearningEnvironment /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. + /// Provisioning state for the environment container. /// A new instance for mocking. - public static MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) + public static MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - return new MachineLearningEnvironmentContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion); + return new MachineLearningEnvironmentContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion, provisioningState); } /// Initializes a new instance of MachineLearningEnvironmentVersionData. @@ -799,8 +435,9 @@ public static MachineLearningEnvironmentVersionData MachineLearningEnvironmentVe /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// Defines if image needs to be rebuilt based on base image changes. /// Configuration settings for Docker build context. /// @@ -816,119 +453,114 @@ public static MachineLearningEnvironmentVersionData MachineLearningEnvironmentVe /// <seealso href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" /> /// /// Defines configuration specific to inference. + /// Intellectual Property details. Used if environment is an Intellectual Property. /// The OS type of the environment. + /// Provisioning state for the environment version. + /// Stage in the environment lifecycle assigned to this environment. /// A new instance for mocking. - public static MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isAnonymous = null, bool? isArchived = null, AutoRebuildSetting? autoRebuild = null, MachineLearningBuildContext build = null, string condaFile = null, MachineLearningEnvironmentType? environmentType = null, string image = null, MachineLearningInferenceContainerProperties inferenceConfig = null, MachineLearningOperatingSystemType? osType = null) + public static MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = null, bool? isArchived = null, AutoRebuildSetting? autoRebuild = null, MachineLearningBuildContext build = null, string condaFile = null, MachineLearningEnvironmentType? environmentType = null, string image = null, MachineLearningInferenceContainerProperties inferenceConfig = null, IntellectualProperty intellectualProperty = null, MachineLearningOperatingSystemType? osType = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - return new MachineLearningEnvironmentVersionProperties(description, properties, tags, isAnonymous, isArchived, autoRebuild, build, condaFile, environmentType, image, inferenceConfig, osType); + return new MachineLearningEnvironmentVersionProperties(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, autoRebuild, build, condaFile, environmentType, image, inferenceConfig, intellectualProperty, osType, provisioningState, stage); } - /// Initializes a new instance of MachineLearningJobData. + /// Initializes a new instance of MachineLearningModelContainerData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// A new instance for mocking. - public static MachineLearningJobData MachineLearningJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningJobProperties properties = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningModelContainerData MachineLearningModelContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelContainerProperties properties = null) { - return new MachineLearningJobData(id, name, resourceType, systemData, properties); + return new MachineLearningModelContainerData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of MachineLearningJobProperties. + /// Initializes a new instance of MachineLearningModelContainerProperties. /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// /// Is the asset archived?. - /// [Required] Specifies the type of job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// A new instance for mocking. - public static MachineLearningJobProperties MachineLearningJobProperties(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, string jobType = "Unknown", IDictionary services = null, MachineLearningJobStatus? status = null) + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the model container. + /// A new instance for mocking. + public static MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - services ??= new Dictionary(); - - return new MachineLearningJobProperties(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status); - } - - /// Initializes a new instance of MachineLearningJobService. - /// Url for endpoint. - /// Any error in the service. - /// Endpoint type. - /// Port for endpoint. - /// Additional properties to set on the endpoint. - /// Status of endpoint. - /// A new instance for mocking. - public static MachineLearningJobService MachineLearningJobService(string endpoint = null, string errorMessage = null, string jobServiceType = null, int? port = null, IDictionary properties = null, string status = null) - { - properties ??= new Dictionary(); - return new MachineLearningJobService(endpoint, errorMessage, jobServiceType, port, properties, status); + return new MachineLearningModelContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion, provisioningState); } - /// Initializes a new instance of MachineLearningModelContainerData. + /// Initializes a new instance of MachineLearningModelVersionData. /// The id. /// The name. /// The resourceType. /// The systemData. /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningModelContainerData MachineLearningModelContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelContainerProperties properties = null) + /// A new instance for mocking. + public static MachineLearningModelVersionData MachineLearningModelVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelVersionProperties properties = null) { - return new MachineLearningModelContainerData(id, name, resourceType, systemData, properties); + return new MachineLearningModelVersionData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of MachineLearningModelContainerProperties. + /// Initializes a new instance of MachineLearningModelVersionProperties. /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// A new instance for mocking. - public static MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// Mapping of model flavors to their properties. + /// Intellectual Property details. Used if model is an Intellectual Property. + /// Name of the training job which produced this model. + /// The storage format for this entity. Used for NCD. + /// The URI path to the model contents. + /// Provisioning state for the model version. + /// Stage in the model lifecycle assigned to this model. + /// A new instance for mocking. + public static MachineLearningModelVersionProperties MachineLearningModelVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = null, bool? isArchived = null, IDictionary flavors = null, IntellectualProperty intellectualProperty = null, string jobName = null, string modelType = null, Uri modelUri = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); + flavors ??= new Dictionary(); - return new MachineLearningModelContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion); + return new MachineLearningModelVersionProperties(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, flavors, intellectualProperty, jobName, modelType, modelUri, provisioningState, stage); } - /// Initializes a new instance of MachineLearningModelVersionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningModelVersionData MachineLearningModelVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelVersionProperties properties = null) + /// Initializes a new instance of ModelPackageResult. + /// + /// Base environment to start with. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Build id of the image build operation. + /// Build state of the image build operation. + /// Collection of environment variables. + /// + /// Inferencing server configurations. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// Collection of inputs. + /// Log url of the image build operation. + /// Model configuration including the mount mode. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Asset ID of the target environment created by package operation. + /// A new instance for mocking. + public static ModelPackageResult ModelPackageResult(BaseEnvironmentSource baseEnvironmentSource = null, string buildId = null, PackageBuildState? buildState = null, IReadOnlyDictionary environmentVariables = null, InferencingServer inferencingServer = null, IEnumerable inputs = null, Uri logUri = null, ModelConfiguration modelConfiguration = null, IReadOnlyDictionary tags = null, string targetEnvironmentId = null) { - return new MachineLearningModelVersionData(id, name, resourceType, systemData, properties); + environmentVariables ??= new Dictionary(); + inputs ??= new List(); + tags ??= new Dictionary(); + + return new ModelPackageResult(baseEnvironmentSource, buildId, buildState, environmentVariables, inferencingServer, inputs?.ToList(), logUri, modelConfiguration, tags, targetEnvironmentId); } - /// Initializes a new instance of MachineLearningOnlineEndpointData. + /// Initializes a new instance of MachineLearningBatchEndpointData. /// The id. /// The name. /// The resourceType. @@ -939,15 +571,15 @@ public static MachineLearningModelVersionData MachineLearningModelVersionData(Re /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningOnlineEndpointData MachineLearningOnlineEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningOnlineEndpointProperties properties = null, MachineLearningSku sku = null) + /// A new instance for mocking. + public static MachineLearningBatchEndpointData MachineLearningBatchEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningBatchEndpointProperties properties = null, MachineLearningSku sku = null) { tags ??= new Dictionary(); - return new MachineLearningOnlineEndpointData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); + return new MachineLearningBatchEndpointData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); } - /// Initializes a new instance of MachineLearningOnlineEndpointProperties. + /// Initializes a new instance of MachineLearningBatchEndpointProperties. /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// Description of the inference endpoint. /// @@ -957,23 +589,35 @@ public static MachineLearningOnlineEndpointData MachineLearningOnlineEndpointDat /// Property dictionary. Properties can be added, but not removed or altered. /// Endpoint URI. /// Endpoint Swagger URI. - /// - /// ARM resource ID of the compute if it exists. - /// optional - /// + /// Default values for Batch Endpoint. /// Provisioning state for the endpoint. - /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. - /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. - /// A new instance for mocking. - public static MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, string compute = null, MachineLearningEndpointProvisioningState? provisioningState = null, MachineLearningPublicNetworkAccessType? publicNetworkAccess = null, IDictionary traffic = null) + /// A new instance for mocking. + public static MachineLearningBatchEndpointProperties MachineLearningBatchEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, string defaultsDeploymentName = null, MachineLearningEndpointProvisioningState? provisioningState = null) { properties ??= new Dictionary(); - traffic ??= new Dictionary(); - return new MachineLearningOnlineEndpointProperties(authMode, description, keys, properties, scoringUri, swaggerUri, compute, provisioningState, publicNetworkAccess, traffic); + return new MachineLearningBatchEndpointProperties(authMode, description, keys, properties, scoringUri, swaggerUri, defaultsDeploymentName != null ? new BatchEndpointDefaults(defaultsDeploymentName) : null, provisioningState); } - /// Initializes a new instance of MachineLearningOnlineDeploymentData. + /// Initializes a new instance of MachineLearningEndpointProperties. + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Description of the inference endpoint. + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Endpoint URI. + /// Endpoint Swagger URI. + /// A new instance for mocking. + public static MachineLearningEndpointProperties MachineLearningEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null) + { + properties ??= new Dictionary(); + + return new MachineLearningEndpointProperties(authMode, description, keys, properties, scoringUri, swaggerUri); + } + + /// Initializes a new instance of MachineLearningBatchDeploymentData. /// The id. /// The name. /// The resourceType. @@ -982,148 +626,1002 @@ public static MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpo /// The location. /// Managed service identity (system assigned and/or user assigned identities). /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - /// - /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// + /// [Required] Additional attributes of the entity. /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningOnlineDeploymentData MachineLearningOnlineDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningOnlineDeploymentProperties properties = null, MachineLearningSku sku = null) + /// A new instance for mocking. + public static MachineLearningBatchDeploymentData MachineLearningBatchDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningBatchDeploymentProperties properties = null, MachineLearningSku sku = null) { tags ??= new Dictionary(); - return new MachineLearningOnlineDeploymentData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); + return new MachineLearningBatchDeploymentData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); } - /// Initializes a new instance of MachineLearningOnlineDeploymentProperties. + /// Initializes a new instance of MachineLearningBatchDeploymentProperties. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. - /// If true, enables Application Insights logging. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - /// [Required] The compute type of the endpoint. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. + /// Compute target for batch inference operation. + /// + /// Properties relevant to different deployment types. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// + /// Error threshold, if the error count for the entire input goes above this value, + /// the batch inference will be aborted. Range is [-1, int.MaxValue]. + /// For FileDataset, this value is the count of file failures. + /// For TabularDataset, this value is the count of record failures. + /// If set to -1 (the lower bound), all failures during batch inference will be ignored. + /// + /// Logging level for batch inference operation. + /// Indicates maximum number of parallelism per instance. + /// + /// 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. + /// + /// + /// Reference to the model asset for the endpoint deployment. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Indicates how the output will be organized. + /// Customized output file name for append_row output action. /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. - /// - /// Scale settings for the deployment. - /// If it is null or not provided, - /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - /// and to DefaultScaleSettings for ManagedOnlineDeployment. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// + /// Indicates compute configuration for the job. + /// If not provided, will default to the defaults defined in ResourceConfiguration. /// - /// A new instance for mocking. - public static MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string endpointComputeType = "Unknown", string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null) + /// + /// Retry Settings for the batch inference operation. + /// If not provided, will default to the defaults defined in BatchRetrySettings. + /// + /// A new instance for mocking. + public static MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, string compute = null, BatchDeploymentConfiguration deploymentConfiguration = null, int? errorThreshold = null, MachineLearningBatchLoggingLevel? loggingLevel = null, int? maxConcurrencyPerInstance = null, long? miniBatchSize = null, MachineLearningAssetReferenceBase model = null, MachineLearningBatchOutputAction? outputAction = null, string outputFileName = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningDeploymentResourceConfiguration resources = null, MachineLearningBatchRetrySettings retrySettings = null) + { + environmentVariables ??= new Dictionary(); + properties ??= new Dictionary(); + + return new MachineLearningBatchDeploymentProperties(codeConfiguration, description, environmentId, environmentVariables, properties, compute, deploymentConfiguration, errorThreshold, loggingLevel, maxConcurrencyPerInstance, miniBatchSize, model, outputAction, outputFileName, provisioningState, resources, retrySettings); + } + + /// Initializes a new instance of MachineLearningDatastoreData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// A new instance for mocking. + public static MachineLearningDatastoreData MachineLearningDatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDatastoreProperties properties = null) + { + return new MachineLearningDatastoreData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningDatastoreProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// [Required] Storage type backing the datastore. + /// Intellectual Property details. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// A new instance for mocking. + public static MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, string datastoreType = "Unknown", IntellectualProperty intellectualProperty = null, bool? isDefault = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new MachineLearningDatastoreProperties(description, properties, tags, credentials, datastoreType, intellectualProperty, isDefault); + } + + /// Initializes a new instance of MachineLearningFeatureSetContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeatureSetContainerData MachineLearningFeatureSetContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureSetContainerProperties properties = null) + { + return new MachineLearningFeatureSetContainerData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningFeatureSetContainerProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the featureset container. + /// A new instance for mocking. + public static MachineLearningFeatureSetContainerProperties MachineLearningFeatureSetContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new MachineLearningFeatureSetContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion, provisioningState); + } + + /// Initializes a new instance of MachineLearningFeatureData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeatureData MachineLearningFeatureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureProperties properties = null) + { + return new MachineLearningFeatureData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningFeatureSetVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeatureSetVersionData MachineLearningFeatureSetVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureSetVersionProperties properties = null) + { + return new MachineLearningFeatureSetVersionData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningFeatureSetVersionProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// Specifies list of entities. + /// Specifies the materialization settings. + /// Provisioning state for the featureset version container. + /// Specifies the feature spec details. + /// Specifies the asset stage. + /// A new instance for mocking. + public static MachineLearningFeatureSetVersionProperties MachineLearningFeatureSetVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = null, bool? isArchived = null, IEnumerable entities = null, MaterializationSettings materializationSettings = null, RegistryAssetProvisioningState? provisioningState = null, string specificationPath = null, string stage = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + entities ??= new List(); + + return new MachineLearningFeatureSetVersionProperties(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, entities?.ToList(), materializationSettings, provisioningState, specificationPath != null ? new FeaturesetSpecification(specificationPath) : null, stage); + } + + /// Initializes a new instance of MachineLearningFeatureSetJob. + /// Specifies the created date. + /// Specifies the display name. + /// Specifies the duration. + /// Specifies the experiment id. + /// Specifies the backfill feature window to be materialized. + /// Specifies the job id. + /// Specifies the job status. + /// Specifies the tags if any. + /// Specifies the feature store job type. + /// A new instance for mocking. + public static MachineLearningFeatureSetJob MachineLearningFeatureSetJob(DateTimeOffset? createdOn = null, string displayName = null, TimeSpan? duration = null, string experimentId = null, FeatureWindow featureWindow = null, string jobId = null, MachineLearningJobStatus? status = null, IReadOnlyDictionary tags = null, FeatureStoreJobType? featureStoreJobType = null) + { + tags ??= new Dictionary(); + + return new MachineLearningFeatureSetJob(createdOn, displayName, duration, experimentId, featureWindow, jobId, status, tags, featureStoreJobType); + } + + /// Initializes a new instance of MachineLearningFeatureStoreEntityContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeatureStoreEntityContainerData MachineLearningFeatureStoreEntityContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureStoreEntityContainerProperties properties = null) + { + return new MachineLearningFeatureStoreEntityContainerData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningFeatureStoreEntityContainerProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the featurestore entity container. + /// A new instance for mocking. + public static MachineLearningFeatureStoreEntityContainerProperties MachineLearningFeatureStoreEntityContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new MachineLearningFeatureStoreEntityContainerProperties(description, properties, tags, isArchived, latestVersion, nextVersion, provisioningState); + } + + /// Initializes a new instance of MachineLearningFeaturestoreEntityVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeaturestoreEntityVersionData MachineLearningFeaturestoreEntityVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureStoreEntityVersionProperties properties = null) + { + return new MachineLearningFeaturestoreEntityVersionData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningFeatureStoreEntityVersionProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// Specifies index columns. + /// Provisioning state for the featurestore entity version. + /// Specifies the asset stage. + /// A new instance for mocking. + public static MachineLearningFeatureStoreEntityVersionProperties MachineLearningFeatureStoreEntityVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, AutoDeleteSetting autoDeleteSetting = null, bool? isAnonymous = null, bool? isArchived = null, IEnumerable indexColumns = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + indexColumns ??= new List(); + + return new MachineLearningFeatureStoreEntityVersionProperties(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, indexColumns?.ToList(), provisioningState, stage); + } + + /// Initializes a new instance of MachineLearningJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// A new instance for mocking. + public static MachineLearningJobData MachineLearningJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningJobProperties properties = null) + { + return new MachineLearningJobData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningJobProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// ARM resource ID of the component resource. + /// ARM resource ID of the compute resource. + /// Display name of job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Is the asset archived?. + /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// Status of the job. + /// A new instance for mocking. + public static MachineLearningJobProperties MachineLearningJobProperties(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, string jobType = "Unknown", NotificationSetting notificationSetting = null, IDictionary secretsConfiguration = null, IDictionary services = null, MachineLearningJobStatus? status = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + secretsConfiguration ??= new Dictionary(); + services ??= new Dictionary(); + + return new MachineLearningJobProperties(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, secretsConfiguration, services, status); + } + + /// Initializes a new instance of MachineLearningJobService. + /// Url for endpoint. + /// Any error in the service. + /// Endpoint type. + /// + /// 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. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Port for endpoint set by user. + /// Additional properties to set on the endpoint. + /// Status of endpoint. + /// A new instance for mocking. + public static MachineLearningJobService MachineLearningJobService(string endpoint = null, string errorMessage = null, string jobServiceType = null, JobNodes nodes = null, int? port = null, IDictionary properties = null, string status = null) + { + properties ??= new Dictionary(); + + return new MachineLearningJobService(endpoint, errorMessage, jobServiceType, nodes, port, properties, status); + } + + /// Initializes a new instance of MachineLearningLabelingJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningLabelingJobData MachineLearningLabelingJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, LabelingJobProperties properties = null) + { + return new MachineLearningLabelingJobData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of LabelingJobProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// ARM resource ID of the component resource. + /// ARM resource ID of the compute resource. + /// Display name of job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Is the asset archived?. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// Status of the job. + /// Created time of the job in UTC timezone. + /// Configuration of data used in the job. + /// Labeling instructions of the job. + /// Label categories of the job. + /// + /// Media type specific properties in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// Configuration of MLAssist feature in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Progress metrics of the job. + /// Internal id of the job(Previously called project). + /// Specifies the labeling job provisioning state. + /// Status messages of the job. + /// A new instance for mocking. + public static LabelingJobProperties LabelingJobProperties(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary secretsConfiguration = null, IDictionary services = null, MachineLearningJobStatus? status = null, DateTimeOffset? createdOn = null, LabelingDataConfiguration dataConfiguration = null, Uri jobInstructionsUri = null, IDictionary labelCategories = null, LabelingJobMediaProperties labelingJobMediaProperties = null, MachineLearningAssistConfiguration mlAssistConfiguration = null, ProgressMetrics progressMetrics = null, Guid? projectId = null, JobProvisioningState? provisioningState = null, IEnumerable statusMessages = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + secretsConfiguration ??= new Dictionary(); + services ??= new Dictionary(); + labelCategories ??= new Dictionary(); + statusMessages ??= new List(); + + return new LabelingJobProperties(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Labeling, notificationSetting, secretsConfiguration, services, status, createdOn, dataConfiguration, jobInstructionsUri != null ? new LabelingJobInstructions(jobInstructionsUri) : null, labelCategories, labelingJobMediaProperties, mlAssistConfiguration, progressMetrics, projectId, provisioningState, statusMessages?.ToList()); + } + + /// Initializes a new instance of ProgressMetrics. + /// The completed datapoint count. + /// The time of last successful incremental data refresh in UTC. + /// The skipped datapoint count. + /// The total datapoint count. + /// A new instance for mocking. + public static ProgressMetrics ProgressMetrics(long? completedDatapointCount = null, DateTimeOffset? incrementalDataLastRefreshOn = null, long? skippedDatapointCount = null, long? totalDatapointCount = null) + { + return new ProgressMetrics(completedDatapointCount, incrementalDataLastRefreshOn, skippedDatapointCount, totalDatapointCount); + } + + /// Initializes a new instance of JobStatusMessage. + /// Service-defined message code. + /// Time in UTC at which the message was created. + /// Severity level of message. + /// A human-readable representation of the message code. + /// A new instance for mocking. + public static JobStatusMessage JobStatusMessage(string code = null, DateTimeOffset? createdOn = null, JobStatusMessageLevel? level = null, string message = null) + { + return new JobStatusMessage(code, createdOn, level, message); + } + + /// Initializes a new instance of ExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// [Required] The format of exported labels, also as the discriminator. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + /// A new instance for mocking. + public static ExportSummary ExportSummary(DateTimeOffset? endOn = null, long? exportedRowCount = null, string format = "Unknown", string labelingJobId = null, DateTimeOffset? startOn = null) + { + return new UnknownExportSummary(endOn, exportedRowCount, format, labelingJobId, startOn); + } + + /// Initializes a new instance of MachineLearningOnlineEndpointData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity (system assigned and/or user assigned identities). + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// [Required] Additional attributes of the entity. + /// Sku details required for ARM contract for Autoscaling. + /// A new instance for mocking. + public static MachineLearningOnlineEndpointData MachineLearningOnlineEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningOnlineEndpointProperties properties = null, MachineLearningSku sku = null) + { + tags ??= new Dictionary(); + + return new MachineLearningOnlineEndpointData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); + } + + /// Initializes a new instance of MachineLearningOnlineEndpointProperties. + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Description of the inference endpoint. + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Endpoint URI. + /// Endpoint Swagger URI. + /// + /// ARM resource ID of the compute if it exists. + /// optional + /// + /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. + /// Provisioning state for the endpoint. + /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + /// A new instance for mocking. + public static MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, string compute = null, IDictionary mirrorTraffic = null, MachineLearningEndpointProvisioningState? provisioningState = null, MachineLearningPublicNetworkAccessType? publicNetworkAccess = null, IDictionary traffic = null) + { + properties ??= new Dictionary(); + mirrorTraffic ??= new Dictionary(); + traffic ??= new Dictionary(); + + return new MachineLearningOnlineEndpointProperties(authMode, description, keys, properties, scoringUri, swaggerUri, compute, mirrorTraffic, provisioningState, publicNetworkAccess, traffic); + } + + /// Initializes a new instance of MachineLearningOnlineDeploymentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity (system assigned and/or user assigned identities). + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// + /// [Required] Additional attributes of the entity. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Sku details required for ARM contract for Autoscaling. + /// A new instance for mocking. + public static MachineLearningOnlineDeploymentData MachineLearningOnlineDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningOnlineDeploymentProperties properties = null, MachineLearningSku sku = null) + { + tags ??= new Dictionary(); + + return new MachineLearningOnlineDeploymentData(id, name, resourceType, systemData, tags, location, identity, kind, properties, sku); + } + + /// Initializes a new instance of MachineLearningOnlineDeploymentProperties. + /// Code configuration for the endpoint deployment. + /// Description of the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. + /// Environment variables configuration for the deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// If true, enables Application Insights logging. + /// The mdc configuration, we disable mdc when it's null. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// [Required] The compute type of the endpoint. + /// Compute instance type. + /// Liveness probe monitors the health of the container regularly. + /// The URI path to the model. + /// The path to mount the model in custom container. + /// Provisioning state for the endpoint deployment. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Request settings for the deployment. + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, DataCollector dataCollector = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string endpointComputeType = "Unknown", string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null) + { + environmentVariables ??= new Dictionary(); + properties ??= new Dictionary(); + + return new MachineLearningOnlineDeploymentProperties(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings); + } + + /// Initializes a new instance of MachineLearningDeploymentLogs. + /// The retrieved online deployment logs. + /// A new instance for mocking. + public static MachineLearningDeploymentLogs MachineLearningDeploymentLogs(string content = null) + { + return new MachineLearningDeploymentLogs(content); + } + + /// Initializes a new instance of MachineLearningSkuDetail. + /// Gets or sets the Sku Capacity. + /// The resource type name. + /// Gets or sets the Sku. + /// A new instance for mocking. + public static MachineLearningSkuDetail MachineLearningSkuDetail(MachineLearningSkuCapacity capacity = null, string resourceType = null, MachineLearningSkuSetting sku = null) + { + return new MachineLearningSkuDetail(capacity, resourceType, sku); + } + + /// Initializes a new instance of MachineLearningSkuCapacity. + /// Gets or sets the default capacity. + /// Gets or sets the maximum. + /// Gets or sets the minimum. + /// Gets or sets the type of the scale. + /// A new instance for mocking. + public static MachineLearningSkuCapacity MachineLearningSkuCapacity(int? @default = null, int? maximum = null, int? minimum = null, MachineLearningSkuScaleType? scaleType = null) + { + return new MachineLearningSkuCapacity(@default, maximum, minimum, scaleType); + } + + /// Initializes a new instance of MachineLearningSkuSetting. + /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. + /// 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. + /// A new instance for mocking. + public static MachineLearningSkuSetting MachineLearningSkuSetting(string name = null, MachineLearningSkuTier? tier = null) + { + return new MachineLearningSkuSetting(name, tier); + } + + /// Initializes a new instance of MachineLearningEndpointAuthToken. + /// Access token for endpoint authentication. + /// Access token expiry time (UTC). + /// Refresh access token after time (UTC). + /// Access token type. + /// A new instance for mocking. + public static MachineLearningEndpointAuthToken MachineLearningEndpointAuthToken(string accessToken = null, DateTimeOffset? expireOn = null, DateTimeOffset? refreshOn = null, string tokenType = null) + { + return new MachineLearningEndpointAuthToken(accessToken, expireOn, refreshOn, tokenType); + } + + /// Initializes a new instance of MachineLearningScheduleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningScheduleData MachineLearningScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningScheduleProperties properties = null) + { + return new MachineLearningScheduleData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningScheduleProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// + /// [Required] Specifies the action of the schedule + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// Display name of schedule. + /// Is the schedule enabled?. + /// Provisioning state for the schedule. + /// + /// [Required] Specifies the trigger details + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static MachineLearningScheduleProperties MachineLearningScheduleProperties(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningScheduleAction action = null, string displayName = null, bool? isEnabled = null, MachineLearningScheduleProvisioningStatus? provisioningState = null, MachineLearningTriggerBase trigger = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new MachineLearningScheduleProperties(description, properties, tags, action, displayName, isEnabled, provisioningState, trigger); + } + + /// Initializes a new instance of MachineLearningRegistryData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity (system assigned and/or user assigned identities). + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Sku details required for ARM contract for Autoscaling. + /// Discovery URL for the Registry. + /// IntellectualPropertyPublisher for the registry. + /// ResourceId of the managed RG if the registry has system created resources. + /// MLFlow Registry URI for the Registry. + /// Private endpoint connections info used for pending connections in private link portal. + /// + /// Is the Registry accessible from the internet? + /// Possible values: "Enabled" or "Disabled" + /// + /// Details of each region the registry is in. + /// A new instance for mocking. + public static MachineLearningRegistryData MachineLearningRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningSku sku = null, Uri discoveryUri = null, string intellectualPropertyPublisher = null, ResourceIdentifier managedResourceId = null, Uri mlFlowRegistryUri = null, IEnumerable privateEndpointConnections = null, string publicNetworkAccess = null, IEnumerable regionDetails = null) + { + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + regionDetails ??= new List(); + + return new MachineLearningRegistryData(id, name, resourceType, systemData, tags, location, identity, kind, sku, discoveryUri, intellectualPropertyPublisher, managedResourceId != null ? new ArmResourceId(managedResourceId) : null, mlFlowRegistryUri, privateEndpointConnections?.ToList(), publicNetworkAccess, regionDetails?.ToList()); + } + + /// Initializes a new instance of RegistryPrivateEndpoint. + /// The ARM identifier for Private Endpoint. + /// The subnetId that the private endpoint is connected to. + /// A new instance for mocking. + public static RegistryPrivateEndpoint RegistryPrivateEndpoint(ResourceIdentifier id = null, ResourceIdentifier subnetArmId = null) + { + return new RegistryPrivateEndpoint(id, subnetArmId); + } + + /// Initializes a new instance of PrivateEndpointBase. + /// The ARM identifier for Private Endpoint. + /// A new instance for mocking. + public static PrivateEndpointBase PrivateEndpointBase(ResourceIdentifier id = null) + { + return new PrivateEndpointBase(id); + } + + /// Initializes a new instance of MachineLearningUserFeature. + /// Specifies the feature ID. + /// Specifies the feature name. + /// Describes the feature for user experience. + /// A new instance for mocking. + public static MachineLearningUserFeature MachineLearningUserFeature(string id = null, string displayName = null, string description = null) + { + return new MachineLearningUserFeature(id, displayName, description); + } + + /// Initializes a new instance of MachineLearningWorkspaceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity (system assigned and/or user assigned identities). + /// + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The flag to indicate whether to allow public access when behind VNet. + /// ARM id of the application insights associated with this workspace. + /// + /// + /// ARM id of the container registry associated with this workspace. + /// The description of this workspace. + /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. + /// + /// + /// + /// Settings for feature store type workspace. + /// The friendly name for this workspace. This name in mutable. + /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. + /// + /// The compute name for image build. + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + /// + /// Managed Network settings for a machine learning workspace. + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + /// The notebook info of Azure ML workspace. + /// The user assigned identity resource id that represents the workspace identity. + /// The list of private endpoint connections in the workspace. + /// Count of private connections in the workspace. + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// Whether requests from Public Network are allowed. + /// The service managed resource settings. + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + /// The list of shared private link resources in this workspace. + /// Retention time in days after workspace get soft deleted. + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + /// + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + /// The auth mode used for accessing the system datastores of the workspace. + /// The tenant id associated with this workspace. + /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + /// WorkspaceHub's configuration object. + /// The immutable id associated with this workspace. + /// A new instance for mocking. + public static MachineLearningWorkspaceData MachineLearningWorkspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningSku sku = null, bool? allowPublicAccessWhenBehindVnet = null, string applicationInsights = null, IEnumerable associatedWorkspaces = null, IEnumerable containerRegistries = null, string containerRegistry = null, string description = null, Uri discoveryUri = null, bool? enableDataIsolation = null, MachineLearningEncryptionSetting encryption = null, IEnumerable existingWorkspaces = null, FeatureStoreSettings featureStoreSettings = null, string friendlyName = null, bool? isHbiWorkspace = null, ResourceIdentifier hubResourceId = null, string imageBuildCompute = null, string keyVault = null, IEnumerable keyVaults = null, ManagedNetworkSettings managedNetwork = null, Uri mlFlowTrackingUri = null, MachineLearningNotebookResourceInfo notebookInfo = null, string primaryUserAssignedIdentity = null, IEnumerable privateEndpointConnections = null, int? privateLinkCount = null, MachineLearningProvisioningState? provisioningState = null, MachineLearningPublicNetworkAccessType? publicNetworkAccessType = null, int? cosmosDbCollectionsThroughput = null, string serviceProvisionedResourceGroup = null, IEnumerable sharedPrivateLinkResources = null, int? softDeleteRetentionInDays = null, string storageAccount = null, IEnumerable storageAccounts = null, bool? isStorageHnsEnabled = null, string systemDatastoresAuthMode = null, Guid? tenantId = null, bool? isV1LegacyMode = null, WorkspaceHubConfig workspaceHubConfig = null, string workspaceId = null) + { + tags ??= new Dictionary(); + associatedWorkspaces ??= new List(); + containerRegistries ??= new List(); + existingWorkspaces ??= new List(); + keyVaults ??= new List(); + privateEndpointConnections ??= new List(); + sharedPrivateLinkResources ??= new List(); + storageAccounts ??= new List(); + + return new MachineLearningWorkspaceData(id, name, resourceType, systemData, tags, location, identity, kind, sku, allowPublicAccessWhenBehindVnet, applicationInsights, associatedWorkspaces?.ToList(), containerRegistries?.ToList(), containerRegistry, description, discoveryUri, enableDataIsolation, encryption, existingWorkspaces?.ToList(), featureStoreSettings, friendlyName, isHbiWorkspace, hubResourceId, imageBuildCompute, keyVault, keyVaults?.ToList(), managedNetwork, mlFlowTrackingUri, notebookInfo, primaryUserAssignedIdentity, privateEndpointConnections?.ToList(), privateLinkCount, provisioningState, publicNetworkAccessType, cosmosDbCollectionsThroughput != null ? new ServiceManagedResourcesSettings(new CosmosDbSettings(cosmosDbCollectionsThroughput)) : null, serviceProvisionedResourceGroup, sharedPrivateLinkResources?.ToList(), softDeleteRetentionInDays, storageAccount, storageAccounts?.ToList(), isStorageHnsEnabled, systemDatastoresAuthMode, tenantId, isV1LegacyMode, workspaceHubConfig, workspaceId); + } + + /// Initializes a new instance of ManagedNetworkSettings. + /// Isolation mode for the managed network of a machine learning workspace. + /// + /// + /// Dictionary of <OutboundRule> + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Status of the Provisioning for the managed network of a machine learning workspace. + /// A new instance for mocking. + public static ManagedNetworkSettings ManagedNetworkSettings(IsolationMode? isolationMode = null, string networkId = null, IDictionary outboundRules = null, ManagedNetworkProvisionStatus status = null) + { + outboundRules ??= new Dictionary(); + + return new ManagedNetworkSettings(isolationMode, networkId, outboundRules, status); + } + + /// Initializes a new instance of MachineLearningNotebookResourceInfo. + /// + /// + /// The error that occurs when preparing notebook. + /// the data plane resourceId that used to initialize notebook component. + /// A new instance for mocking. + public static MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, bool? isPrivateLinkEnabled = null, MachineLearningNotebookPreparationError notebookPreparationError = null, string resourceId = null) + { + return new MachineLearningNotebookResourceInfo(fqdn, isPrivateLinkEnabled, notebookPreparationError, resourceId); + } + + /// Initializes a new instance of MachineLearningNotebookPreparationError. + /// + /// + /// A new instance for mocking. + public static MachineLearningNotebookPreparationError MachineLearningNotebookPreparationError(string errorMessage = null, int? statusCode = null) + { + return new MachineLearningNotebookPreparationError(errorMessage, statusCode); + } + + /// Initializes a new instance of MachineLearningPrivateEndpointConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity (system assigned and/or user assigned identities). + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The Private Endpoint resource. + /// The connection state. + /// The current provisioning state. + /// A new instance for mocking. + public static MachineLearningPrivateEndpointConnectionData MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, MachineLearningPrivateEndpoint privateEndpoint = null, MachineLearningPrivateLinkServiceConnectionState connectionState = null, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + + return new MachineLearningPrivateEndpointConnectionData(id, name, resourceType, systemData, tags, location, identity, sku, privateEndpoint, connectionState, provisioningState); + } + + /// Initializes a new instance of MachineLearningPrivateEndpoint. + /// e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}. + /// The subnetId that the private endpoint is connected to. + /// A new instance for mocking. + public static MachineLearningPrivateEndpoint MachineLearningPrivateEndpoint(ResourceIdentifier id = null, ResourceIdentifier subnetArmId = null) + { + return new MachineLearningPrivateEndpoint(id, subnetArmId); + } + + /// Initializes a new instance of MachineLearningWorkspaceConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , and . + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceConnectionData MachineLearningWorkspaceConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningWorkspaceConnectionProperties properties = null) + { + return new MachineLearningWorkspaceConnectionData(id, name, resourceType, systemData, properties); + } + + /// Initializes a new instance of MachineLearningWorkspaceDiagnoseResult. + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceDiagnoseResult MachineLearningWorkspaceDiagnoseResult(MachineLearningDiagnoseResultValue value = null) + { + return new MachineLearningWorkspaceDiagnoseResult(value); + } + + /// Initializes a new instance of MachineLearningDiagnoseResultValue. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static MachineLearningDiagnoseResultValue MachineLearningDiagnoseResultValue(IEnumerable userDefinedRouteResults = null, IEnumerable networkSecurityRuleResults = null, IEnumerable resourceLockResults = null, IEnumerable dnsResolutionResults = null, IEnumerable storageAccountResults = null, IEnumerable keyVaultResults = null, IEnumerable containerRegistryResults = null, IEnumerable applicationInsightsResults = null, IEnumerable otherResults = null) + { + userDefinedRouteResults ??= new List(); + networkSecurityRuleResults ??= new List(); + resourceLockResults ??= new List(); + dnsResolutionResults ??= new List(); + storageAccountResults ??= new List(); + keyVaultResults ??= new List(); + containerRegistryResults ??= new List(); + applicationInsightsResults ??= new List(); + otherResults ??= new List(); + + return new MachineLearningDiagnoseResultValue(userDefinedRouteResults?.ToList(), networkSecurityRuleResults?.ToList(), resourceLockResults?.ToList(), dnsResolutionResults?.ToList(), storageAccountResults?.ToList(), keyVaultResults?.ToList(), containerRegistryResults?.ToList(), applicationInsightsResults?.ToList(), otherResults?.ToList()); + } + + /// Initializes a new instance of MachineLearningDiagnoseResult. + /// Code for workspace setup error. + /// Level of workspace setup error. + /// Message of workspace setup error. + /// A new instance for mocking. + public static MachineLearningDiagnoseResult MachineLearningDiagnoseResult(string code = null, MachineLearningDiagnoseResultLevel? level = null, string message = null) + { + return new MachineLearningDiagnoseResult(code, level, message); + } + + /// Initializes a new instance of MachineLearningWorkspaceGetKeysResult. + /// The access key of the workspace app insights. + /// + /// + /// The arm Id key of the workspace storage. + /// The access key of the workspace storage. + /// A new instance for mocking. + public static MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string appInsightsInstrumentationKey = null, MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null, string userStorageResourceId = null, string userStorageKey = null) + { + return new MachineLearningWorkspaceGetKeysResult(appInsightsInstrumentationKey, containerRegistryCredentials, notebookAccessKeys, userStorageResourceId, userStorageKey); + } + + /// Initializes a new instance of MachineLearningContainerRegistryCredentials. + /// The location of the workspace ACR. + /// + /// The username of the workspace ACR. + /// A new instance for mocking. + public static MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(AzureLocation? location = null, IEnumerable passwords = null, string username = null) { - environmentVariables ??= new Dictionary(); - properties ??= new Dictionary(); + passwords ??= new List(); - return new MachineLearningOnlineDeploymentProperties(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings); + return new MachineLearningContainerRegistryCredentials(location, passwords?.ToList(), username); } - /// Initializes a new instance of MachineLearningDeploymentLogs. - /// The retrieved online deployment logs. - /// A new instance for mocking. - public static MachineLearningDeploymentLogs MachineLearningDeploymentLogs(string content = null) + /// Initializes a new instance of MachineLearningPasswordDetail. + /// + /// + /// A new instance for mocking. + public static MachineLearningPasswordDetail MachineLearningPasswordDetail(string name = null, string value = null) { - return new MachineLearningDeploymentLogs(content); + return new MachineLearningPasswordDetail(name, value); } - /// Initializes a new instance of MachineLearningSkuDetail. - /// Gets or sets the Sku Capacity. - /// The resource type name. - /// Gets or sets the Sku. - /// A new instance for mocking. - public static MachineLearningSkuDetail MachineLearningSkuDetail(MachineLearningSkuCapacity capacity = null, string resourceType = null, MachineLearningSkuSetting sku = null) + /// Initializes a new instance of MachineLearningWorkspaceGetNotebookKeysResult. + /// The primary access key of the Notebook. + /// The secondary access key of the Notebook. + /// A new instance for mocking. + public static MachineLearningWorkspaceGetNotebookKeysResult MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey = null, string secondaryAccessKey = null) { - return new MachineLearningSkuDetail(capacity, resourceType, sku); + return new MachineLearningWorkspaceGetNotebookKeysResult(primaryAccessKey, secondaryAccessKey); } - /// Initializes a new instance of MachineLearningSkuCapacity. - /// Gets or sets the default capacity. - /// Gets or sets the maximum. - /// Gets or sets the minimum. - /// Gets or sets the type of the scale. - /// A new instance for mocking. - public static MachineLearningSkuCapacity MachineLearningSkuCapacity(int? @default = null, int? maximum = null, int? minimum = null, MachineLearningSkuScaleType? scaleType = null) + /// Initializes a new instance of MachineLearningWorkspaceNotebookAccessTokenResult. + /// + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string accessToken = null, int? expiresIn = null, string hostName = null, string notebookResourceId = null, string publicDns = null, string refreshToken = null, string scope = null, string tokenType = null) { - return new MachineLearningSkuCapacity(@default, maximum, minimum, scaleType); + return new MachineLearningWorkspaceNotebookAccessTokenResult(accessToken, expiresIn, hostName, notebookResourceId, publicDns, refreshToken, scope, tokenType); } - /// Initializes a new instance of MachineLearningSkuSetting. - /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - /// 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. - /// A new instance for mocking. - public static MachineLearningSkuSetting MachineLearningSkuSetting(string name = null, MachineLearningSkuTier? tier = null) + /// Initializes a new instance of MachineLearningWorkspaceGetStorageAccountKeysResult. + /// The access key of the storage. + /// A new instance for mocking. + public static MachineLearningWorkspaceGetStorageAccountKeysResult MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey = null) { - return new MachineLearningSkuSetting(name, tier); + return new MachineLearningWorkspaceGetStorageAccountKeysResult(userStorageKey); } - /// Initializes a new instance of MachineLearningEndpointAuthToken. - /// Access token for endpoint authentication. - /// Access token expiry time (UTC). - /// Refresh access token after time (UTC). - /// Access token type. - /// A new instance for mocking. - public static MachineLearningEndpointAuthToken MachineLearningEndpointAuthToken(string accessToken = null, DateTimeOffset? expireOn = null, DateTimeOffset? refreshOn = null, string tokenType = null) + /// Initializes a new instance of MachineLearningFqdnEndpoints. + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpoints MachineLearningFqdnEndpoints(MachineLearningFqdnEndpointsProperties properties = null) { - return new MachineLearningEndpointAuthToken(accessToken, expireOn, refreshOn, tokenType); + return new MachineLearningFqdnEndpoints(properties); } - /// Initializes a new instance of MachineLearningScheduleData. + /// Initializes a new instance of MachineLearningFqdnEndpointsProperties. + /// + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpointsProperties MachineLearningFqdnEndpointsProperties(string category = null, IEnumerable endpoints = null) + { + endpoints ??= new List(); + + return new MachineLearningFqdnEndpointsProperties(category, endpoints?.ToList()); + } + + /// Initializes a new instance of MachineLearningFqdnEndpoint. + /// + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpoint MachineLearningFqdnEndpoint(string domainName = null, IEnumerable endpointDetails = null) + { + endpointDetails ??= new List(); + + return new MachineLearningFqdnEndpoint(domainName, endpointDetails?.ToList()); + } + + /// Initializes a new instance of MachineLearningFqdnEndpointDetail. + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpointDetail MachineLearningFqdnEndpointDetail(int? port = null) + { + return new MachineLearningFqdnEndpointDetail(port); + } + + /// Initializes a new instance of MachineLearningOutboundRuleBasicData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningScheduleData MachineLearningScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningScheduleProperties properties = null) + /// + /// Outbound Rule for the managed network of a machine learning workspace. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static MachineLearningOutboundRuleBasicData MachineLearningOutboundRuleBasicData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningOutboundRule properties = null) { - return new MachineLearningScheduleData(id, name, resourceType, systemData, properties); + return new MachineLearningOutboundRuleBasicData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of MachineLearningScheduleProperties. - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Specifies the action of the schedule - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// Display name of schedule. - /// Is the schedule enabled?. - /// Provisioning state for the schedule. - /// - /// [Required] Specifies the trigger details - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static MachineLearningScheduleProperties MachineLearningScheduleProperties(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningScheduleAction action = null, string displayName = null, bool? isEnabled = null, MachineLearningScheduleProvisioningStatus? provisioningState = null, MachineLearningTriggerBase trigger = null) + /// Initializes a new instance of MachineLearningPrivateLinkResource. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity (system assigned and/or user assigned identities). + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource Private link DNS zone name. + /// A new instance for mocking. + public static MachineLearningPrivateLinkResource MachineLearningPrivateLinkResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); - return new MachineLearningScheduleProperties(description, properties, tags, action, displayName, isEnabled, provisioningState, trigger); - } - - /// Initializes a new instance of MachineLearningUserFeature. - /// Specifies the feature ID. - /// Specifies the feature name. - /// Describes the feature for user experience. - /// A new instance for mocking. - public static MachineLearningUserFeature MachineLearningUserFeature(string id = null, string displayName = null, string description = null) - { - return new MachineLearningUserFeature(id, displayName, description); + return new MachineLearningPrivateLinkResource(id, name, resourceType, systemData, tags, location, identity, sku, groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); } /// Initializes a new instance of MachineLearningAksCompute. @@ -1250,39 +1748,6 @@ public static AmlCompute AmlCompute(string computeLocation = null, MachineLearni return new AmlCompute(ComputeType.AmlCompute, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors?.ToList(), isAttachedCompute, disableLocalAuth, properties); } - /// Initializes a new instance of MachineLearningComputeInstanceProperties. - /// Virtual Machine Size. - /// Virtual network subnet resource ID the compute nodes belong to. - /// Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. - /// Specifies policy and settings for SSH access. - /// Describes all connectivity endpoints available for this ComputeInstance. - /// Describes available applications and their endpoints on this ComputeInstance. - /// Describes information on user who created this ComputeInstance. - /// Collection of errors encountered on this ComputeInstance. - /// The current state of this ComputeInstance. - /// The Compute Instance Authorization type. Available values are personal (default). - /// Settings for a personal compute instance. - /// Details of customized scripts to execute for setting up the cluster. - /// The last operation on ComputeInstance. - /// The list of schedules to be applied on the computes. - /// Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. - /// Describes informations of containers on this ComputeInstance. - /// Describes informations of dataDisks on this ComputeInstance. - /// Describes informations of dataMounts on this ComputeInstance. - /// ComputeInstance version. - /// A new instance for mocking. - public static MachineLearningComputeInstanceProperties MachineLearningComputeInstanceProperties(string vmSize = null, ResourceIdentifier subnetId = null, MachineLearningApplicationSharingPolicy? applicationSharingPolicy = null, MachineLearningComputeInstanceSshSettings sshSettings = null, MachineLearningComputeInstanceConnectivityEndpoints connectivityEndpoints = null, IEnumerable applications = null, MachineLearningComputeInstanceCreatedBy createdBy = null, IEnumerable errors = null, MachineLearningComputeInstanceState? state = null, MachineLearningComputeInstanceAuthorizationType? computeInstanceAuthorizationType = null, MachineLearningComputeInstanceAssignedUser personalComputeInstanceAssignedUser = null, MachineLearningScriptsToExecute scripts = null, MachineLearningComputeInstanceLastOperation lastOperation = null, IEnumerable schedulesComputeStartStop = null, bool? enableNodePublicIP = null, IEnumerable containers = null, IEnumerable dataDisks = null, IEnumerable dataMounts = null, string versionsRuntime = null) - { - applications ??= new List(); - errors ??= new List(); - schedulesComputeStartStop ??= new List(); - containers ??= new List(); - dataDisks ??= new List(); - dataMounts ??= new List(); - - return new MachineLearningComputeInstanceProperties(vmSize, subnetId != null ? new ResourceId(subnetId) : null, applicationSharingPolicy, sshSettings, connectivityEndpoints, applications?.ToList(), createdBy, errors?.ToList(), state, computeInstanceAuthorizationType, personalComputeInstanceAssignedUser != null ? new PersonalComputeInstanceSettings(personalComputeInstanceAssignedUser) : null, scripts != null ? new SetupScripts(scripts) : null, lastOperation, schedulesComputeStartStop != null ? new ComputeSchedules(schedulesComputeStartStop?.ToList()) : null, enableNodePublicIP, containers?.ToList(), dataDisks?.ToList(), dataMounts?.ToList(), versionsRuntime != null ? new ComputeInstanceVersion(versionsRuntime) : null); - } - /// Initializes a new instance of MachineLearningComputeInstanceSshSettings. /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. /// Describes the admin user name. @@ -1294,6 +1759,16 @@ public static MachineLearningComputeInstanceSshSettings MachineLearningComputeIn return new MachineLearningComputeInstanceSshSettings(sshPublicAccess, adminUserName, sshPort, adminPublicKey); } + /// Initializes a new instance of ImageMetadata. + /// Specifies the current operating system image version this compute instance is running on. + /// Specifies the latest available operating system image version. + /// Specifies whether this compute instance is running on the latest operating system image. + /// A new instance for mocking. + public static ImageMetadata ImageMetadata(string currentImageVersion = null, string latestImageVersion = null, bool? isLatestOSImageVersion = null) + { + return new ImageMetadata(currentImageVersion, latestImageVersion, isLatestOSImageVersion); + } + /// Initializes a new instance of MachineLearningComputeInstanceConnectivityEndpoints. /// Public IP Address of this ComputeInstance. /// Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). @@ -1339,23 +1814,13 @@ public static MachineLearningComputeInstanceLastOperation MachineLearningCompute /// Is the schedule enabled or disabled?. /// [Required] The compute power action. /// [Required] The schedule trigger type. - /// Required if triggerType is Recurrence. - /// Required if triggerType is Cron. + /// Required if triggerType is Recurrence. + /// Required if triggerType is Cron. /// [Deprecated] Not used any more. /// A new instance for mocking. - public static MachineLearningComputeStartStopSchedule MachineLearningComputeStartStopSchedule(string id = null, MachineLearningComputeProvisioningStatus? provisioningStatus = null, MachineLearningScheduleStatus? status = null, MachineLearningComputePowerAction? action = null, MachineLearningTriggerType? triggerType = null, MachineLearningRecurrenceTrigger recurrence = null, CronTrigger cron = null, MachineLearningScheduleBase schedule = null) - { - return new MachineLearningComputeStartStopSchedule(id, provisioningStatus, status, action, triggerType, recurrence, cron, schedule); - } - - /// Initializes a new instance of MachineLearningScheduleBase. - /// A system assigned id for the schedule. - /// The current deployment state of schedule. - /// Is the schedule enabled or disabled?. - /// A new instance for mocking. - public static MachineLearningScheduleBase MachineLearningScheduleBase(string id = null, MachineLearningScheduleProvisioningState? provisioningStatus = null, MachineLearningScheduleStatus? status = null) + public static MachineLearningComputeStartStopSchedule MachineLearningComputeStartStopSchedule(string id = null, MachineLearningComputeProvisioningStatus? provisioningStatus = null, MachineLearningScheduleStatus? status = null, MachineLearningComputePowerAction? action = null, MachineLearningTriggerType? triggerType = null, ComputeStartStopRecurrenceSchedule recurrenceSchedule = null, ComputeStartStopCronSchedule cronSchedule = null, MachineLearningScheduleBase schedule = null) { - return new MachineLearningScheduleBase(id, provisioningStatus, status); + return new MachineLearningComputeStartStopSchedule(id, provisioningStatus, status, action, triggerType, recurrenceSchedule, cronSchedule, schedule); } /// Initializes a new instance of MachineLearningComputeInstanceContainer. @@ -1582,6 +2047,8 @@ public static MachineLearningDatabricksComputeSecrets MachineLearningDatabricksC /// The available derived classes include , and . /// /// Is the asset archived?. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. @@ -1597,6 +2064,7 @@ public static MachineLearningDatabricksComputeSecrets MachineLearningDatabricksC /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// + /// Queue settings for the job. /// Compute Resource configuration for the job. /// /// [Required] This represents scenario which can be one of Tables/NLP/Image @@ -1604,15 +2072,16 @@ public static MachineLearningDatabricksComputeSecrets MachineLearningDatabricksC /// The available derived classes include , , , , , , , , and . /// /// A new instance for mocking. - public static AutoMLJob AutoMLJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, IDictionary services = null, MachineLearningJobStatus? status = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary outputs = null, MachineLearningJobResourceConfiguration resources = null, AutoMLVertical taskDetails = null) + public static AutoMLJob AutoMLJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary secretsConfiguration = null, IDictionary services = null, MachineLearningJobStatus? status = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary outputs = null, JobQueueSettings queueSettings = null, MachineLearningJobResourceConfiguration resources = null, AutoMLVertical taskDetails = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); + secretsConfiguration ??= new Dictionary(); services ??= new Dictionary(); environmentVariables ??= new Dictionary(); outputs ??= new Dictionary(); - return new AutoMLJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.AutoML, services, status, environmentId, environmentVariables, outputs, resources, taskDetails); + return new AutoMLJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.AutoML, notificationSetting, secretsConfiguration, services, status, environmentId, environmentVariables, outputs, queueSettings, resources, taskDetails); } /// Initializes a new instance of MachineLearningAzureBlobDatastore. @@ -1622,21 +2091,24 @@ public static AutoMLJob AutoMLJob(string description = null, IDictionary /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// + /// Intellectual Property details. /// Readonly property to indicate if datastore is the workspace default datastore. /// Storage account name. /// Storage account container name. /// Azure cloud endpoint for the storage account. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Azure Resource Group name. + /// Azure Subscription Id. /// A new instance for mocking. - public static MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, string accountName = null, string containerName = null, string endpoint = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null) + public static MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, IntellectualProperty intellectualProperty = null, bool? isDefault = null, string accountName = null, string containerName = null, string endpoint = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string resourceGroup = null, string subscriptionId = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - return new MachineLearningAzureBlobDatastore(description, properties, tags, credentials, DatastoreType.AzureBlob, isDefault, accountName, containerName, endpoint, protocol, serviceDataAccessAuthIdentity); + return new MachineLearningAzureBlobDatastore(description, properties, tags, credentials, DatastoreType.AzureBlob, intellectualProperty, isDefault, accountName, containerName, endpoint, protocol, serviceDataAccessAuthIdentity, resourceGroup, subscriptionId); } /// Initializes a new instance of MachineLearningAzureDataLakeGen1Datastore. @@ -1646,18 +2118,21 @@ public static MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastor /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// + /// Intellectual Property details. /// 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. /// [Required] Azure Data Lake store name. + /// Azure Resource Group name. + /// Azure Subscription Id. /// A new instance for mocking. - public static MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string storeName = null) + public static MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, IntellectualProperty intellectualProperty = null, bool? isDefault = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string storeName = null, string resourceGroup = null, string subscriptionId = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - return new MachineLearningAzureDataLakeGen1Datastore(description, properties, tags, credentials, DatastoreType.AzureDataLakeGen1, isDefault, serviceDataAccessAuthIdentity, storeName); + return new MachineLearningAzureDataLakeGen1Datastore(description, properties, tags, credentials, DatastoreType.AzureDataLakeGen1, intellectualProperty, isDefault, serviceDataAccessAuthIdentity, storeName, resourceGroup, subscriptionId); } /// Initializes a new instance of MachineLearningAzureDataLakeGen2Datastore. @@ -1667,21 +2142,24 @@ public static MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureData /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// + /// Intellectual Property details. /// Readonly property to indicate if datastore is the workspace default datastore. /// [Required] Storage account name. /// Azure cloud endpoint for the storage account. /// [Required] The name of the Data Lake Gen2 filesystem. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Azure Resource Group name. + /// Azure Subscription Id. /// A new instance for mocking. - public static MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, string accountName = null, string endpoint = null, string filesystem = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null) + public static MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, IntellectualProperty intellectualProperty = null, bool? isDefault = null, string accountName = null, string endpoint = null, string filesystem = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string resourceGroup = null, string subscriptionId = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - return new MachineLearningAzureDataLakeGen2Datastore(description, properties, tags, credentials, DatastoreType.AzureDataLakeGen2, isDefault, accountName, endpoint, filesystem, protocol, serviceDataAccessAuthIdentity); + return new MachineLearningAzureDataLakeGen2Datastore(description, properties, tags, credentials, DatastoreType.AzureDataLakeGen2, intellectualProperty, isDefault, accountName, endpoint, filesystem, protocol, serviceDataAccessAuthIdentity, resourceGroup, subscriptionId); } /// Initializes a new instance of MachineLearningAzureFileDatastore. @@ -1691,21 +2169,37 @@ public static MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureData /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// + /// Intellectual Property details. /// Readonly property to indicate if datastore is the workspace default datastore. /// [Required] Storage account name. /// Azure cloud endpoint for the storage account. /// [Required] The name of the Azure file share that the datastore points to. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Azure Resource Group name. + /// Azure Subscription Id. /// A new instance for mocking. - public static MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, string accountName = null, string endpoint = null, string fileShareName = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null) + public static MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, IntellectualProperty intellectualProperty = null, bool? isDefault = null, string accountName = null, string endpoint = null, string fileShareName = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string resourceGroup = null, string subscriptionId = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); - return new MachineLearningAzureFileDatastore(description, properties, tags, credentials, DatastoreType.AzureFile, isDefault, accountName, endpoint, fileShareName, protocol, serviceDataAccessAuthIdentity); + return new MachineLearningAzureFileDatastore(description, properties, tags, credentials, DatastoreType.AzureFile, intellectualProperty, isDefault, accountName, endpoint, fileShareName, protocol, serviceDataAccessAuthIdentity, resourceGroup, subscriptionId); + } + + /// Initializes a new instance of CocoExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + /// The container name to which the labels will be exported. + /// The output path where the labels will be exported. + /// A new instance for mocking. + public static CocoExportSummary CocoExportSummary(DateTimeOffset? endOn = null, long? exportedRowCount = null, string labelingJobId = null, DateTimeOffset? startOn = null, string containerName = null, string snapshotPath = null) + { + return new CocoExportSummary(endOn, exportedRowCount, ExportFormatType.Coco, labelingJobId, startOn, containerName, snapshotPath); } /// Initializes a new instance of MachineLearningCommandJob. @@ -1723,17 +2217,20 @@ public static MachineLearningAzureFileDatastore MachineLearningAzureFileDatastor /// The available derived classes include , and . /// /// Is the asset archived?. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. /// /// Status of the job. + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. /// ARM resource ID of the code asset. /// [Required] The command to execute on startup of the job. eg. "python train.py". /// - /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// /// [Required] The ARM resource ID of the Environment specification for the job. /// Environment variables included in the job. @@ -1749,27 +2246,78 @@ public static MachineLearningAzureFileDatastore MachineLearningAzureFileDatastor /// The available derived classes include , , , , and . /// /// Input parameters. + /// Queue settings for the job. /// Compute Resource configuration for the job. /// A new instance for mocking. - public static MachineLearningCommandJob MachineLearningCommandJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, IDictionary services = null, MachineLearningJobStatus? status = null, ResourceIdentifier codeId = null, string command = null, MachineLearningDistributionConfiguration distribution = null, ResourceIdentifier environmentId = null, IDictionary environmentVariables = null, IDictionary inputs = null, MachineLearningCommandJobLimits limits = null, IDictionary outputs = null, BinaryData parameters = null, MachineLearningJobResourceConfiguration resources = null) + public static MachineLearningCommandJob MachineLearningCommandJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary secretsConfiguration = null, IDictionary services = null, MachineLearningJobStatus? status = null, MachineLearningFlowAutoLoggerState? mlflowAutologger = null, ResourceIdentifier codeId = null, string command = null, MachineLearningDistributionConfiguration distribution = null, ResourceIdentifier environmentId = null, IDictionary environmentVariables = null, IDictionary inputs = null, MachineLearningCommandJobLimits limits = null, IDictionary outputs = null, BinaryData parameters = null, JobQueueSettings queueSettings = null, MachineLearningJobResourceConfiguration resources = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); + secretsConfiguration ??= new Dictionary(); services ??= new Dictionary(); environmentVariables ??= new Dictionary(); inputs ??= new Dictionary(); outputs ??= new Dictionary(); - return new MachineLearningCommandJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Command, services, status, codeId, command, distribution, environmentId, environmentVariables, inputs, limits, outputs, parameters, resources); + return new MachineLearningCommandJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Command, notificationSetting, secretsConfiguration, services, status, mlflowAutologger.HasValue ? new AutologgerSettings(mlflowAutologger.Value) : null, codeId, command, distribution, environmentId, environmentVariables, inputs, limits, outputs, parameters, queueSettings, resources); + } + + /// Initializes a new instance of CsvExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + /// The container name to which the labels will be exported. + /// The output path where the labels will be exported. + /// A new instance for mocking. + public static CsvExportSummary CsvExportSummary(DateTimeOffset? endOn = null, long? exportedRowCount = null, string labelingJobId = null, DateTimeOffset? startOn = null, string containerName = null, string snapshotPath = null) + { + return new CsvExportSummary(endOn, exportedRowCount, ExportFormatType.CSV, labelingJobId, startOn, containerName, snapshotPath); + } + + /// Initializes a new instance of DatasetExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + /// The unique name of the labeled data asset. + /// A new instance for mocking. + public static DatasetExportSummary DatasetExportSummary(DateTimeOffset? endOn = null, long? exportedRowCount = null, string labelingJobId = null, DateTimeOffset? startOn = null, string labeledAssetName = null) + { + return new DatasetExportSummary(endOn, exportedRowCount, ExportFormatType.Dataset, labelingJobId, startOn, labeledAssetName); + } + + /// Initializes a new instance of HdfsDatastore. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// Intellectual Property details. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. + /// [Required] IP Address or DNS HostName. + /// Protocol used to communicate with the storage account (Https/Http). + /// A new instance for mocking. + public static HdfsDatastore HdfsDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, IntellectualProperty intellectualProperty = null, bool? isDefault = null, string hdfsServerCertificate = null, string nameNodeAddress = null, string protocol = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new HdfsDatastore(description, properties, tags, credentials, DatastoreType.Hdfs, intellectualProperty, isDefault, hdfsServerCertificate, nameNodeAddress, protocol); } /// Initializes a new instance of MachineLearningKubernetesOnlineDeployment. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. /// If true, enables Application Insights logging. + /// The mdc configuration, we disable mdc when it's null. /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// Compute instance type. /// Liveness probe monitors the health of the container regularly. @@ -1788,21 +2336,22 @@ public static MachineLearningCommandJob MachineLearningCommandJob(string descrip /// /// The resource requirements for the container (cpu and memory). /// A new instance for mocking. - public static MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null, MachineLearningContainerResourceRequirements containerResourceRequirements = null) + public static MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, DataCollector dataCollector = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null, MachineLearningContainerResourceRequirements containerResourceRequirements = null) { environmentVariables ??= new Dictionary(); properties ??= new Dictionary(); - return new MachineLearningKubernetesOnlineDeployment(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, egressPublicNetworkAccess, MachineLearningEndpointComputeType.Kubernetes, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings, containerResourceRequirements); + return new MachineLearningKubernetesOnlineDeployment(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, MachineLearningEndpointComputeType.Kubernetes, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings, containerResourceRequirements); } /// Initializes a new instance of MachineLearningManagedOnlineDeployment. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. /// If true, enables Application Insights logging. + /// The mdc configuration, we disable mdc when it's null. /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// Compute instance type. /// Liveness probe monitors the health of the container regularly. @@ -1820,12 +2369,40 @@ public static MachineLearningKubernetesOnlineDeployment MachineLearningKubernete /// The available derived classes include and . /// /// A new instance for mocking. - public static MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null) + public static MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, DataCollector dataCollector = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null) { environmentVariables ??= new Dictionary(); properties ??= new Dictionary(); - return new MachineLearningManagedOnlineDeployment(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, egressPublicNetworkAccess, MachineLearningEndpointComputeType.Managed, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings); + return new MachineLearningManagedOnlineDeployment(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, MachineLearningEndpointComputeType.Managed, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings); + } + + /// Initializes a new instance of OneLakeDatastore. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// Intellectual Property details. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] OneLake artifact backing the datastore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// OneLake endpoint to use for the datastore. + /// [Required] OneLake workspace name. + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// A new instance for mocking. + public static OneLakeDatastore OneLakeDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, IntellectualProperty intellectualProperty = null, bool? isDefault = null, OneLakeArtifact artifact = null, string endpoint = null, string oneLakeWorkspaceName = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + + return new OneLakeDatastore(description, properties, tags, credentials, DatastoreType.OneLake, intellectualProperty, isDefault, artifact, endpoint, oneLakeWorkspaceName, serviceDataAccessAuthIdentity); } /// Initializes a new instance of MachineLearningPipelineJob. @@ -1843,6 +2420,8 @@ public static MachineLearningManagedOnlineDeployment MachineLearningManagedOnlin /// The available derived classes include , and . /// /// Is the asset archived?. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. @@ -1862,16 +2441,90 @@ public static MachineLearningManagedOnlineDeployment MachineLearningManagedOnlin /// Pipeline settings, for things like ContinueRunOnStepFailure etc. /// ARM resource ID of source job. /// A new instance for mocking. - public static MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, IDictionary services = null, MachineLearningJobStatus? status = null, IDictionary inputs = null, IDictionary jobs = null, IDictionary outputs = null, BinaryData settings = null, ResourceIdentifier sourceJobId = null) + public static MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary secretsConfiguration = null, IDictionary services = null, MachineLearningJobStatus? status = null, IDictionary inputs = null, IDictionary jobs = null, IDictionary outputs = null, BinaryData settings = null, ResourceIdentifier sourceJobId = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); + secretsConfiguration ??= new Dictionary(); services ??= new Dictionary(); inputs ??= new Dictionary(); jobs ??= new Dictionary(); outputs ??= new Dictionary(); - return new MachineLearningPipelineJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Pipeline, services, status, inputs, jobs, outputs, settings, sourceJobId); + return new MachineLearningPipelineJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Pipeline, notificationSetting, secretsConfiguration, services, status, inputs, jobs, outputs, settings, sourceJobId); + } + + /// Initializes a new instance of SasCredentialDto. + /// Full SAS Uri, including the storage, container/blob path and SAS token. + /// A new instance for mocking. + public static SasCredentialDto SasCredentialDto(Uri sasUri = null) + { + return new SasCredentialDto(PendingUploadCredentialType.Sas, sasUri); + } + + /// Initializes a new instance of SparkJob. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// ARM resource ID of the component resource. + /// ARM resource ID of the compute resource. + /// Display name of job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Is the asset archived?. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// Status of the job. + /// Archive files used in the job. + /// Arguments for the job. + /// [Required] ARM resource ID of the code asset. + /// Spark configured properties. + /// + /// [Required] The entry to execute on startup of the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// The ARM resource ID of the Environment specification for the job. + /// Files used in the job. + /// + /// Mapping of input data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// Jar files used in the job. + /// + /// Mapping of output data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// Python files used in the job. + /// Queue settings for the job. + /// Compute Resource configuration for the job. + /// A new instance for mocking. + public static SparkJob SparkJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary secretsConfiguration = null, IDictionary services = null, MachineLearningJobStatus? status = null, IEnumerable archives = null, string args = null, string codeId = null, IDictionary conf = null, SparkJobEntry entry = null, string environmentId = null, IEnumerable files = null, IDictionary inputs = null, IEnumerable jars = null, IDictionary outputs = null, IEnumerable pyFiles = null, JobQueueSettings queueSettings = null, SparkResourceConfiguration resources = null) + { + properties ??= new Dictionary(); + tags ??= new Dictionary(); + secretsConfiguration ??= new Dictionary(); + services ??= new Dictionary(); + archives ??= new List(); + conf ??= new Dictionary(); + files ??= new List(); + inputs ??= new Dictionary(); + jars ??= new List(); + outputs ??= new Dictionary(); + pyFiles ??= new List(); + + return new SparkJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Spark, notificationSetting, secretsConfiguration, services, status, archives?.ToList(), args, codeId, conf, entry, environmentId, files?.ToList(), inputs, jars?.ToList(), outputs, pyFiles?.ToList(), queueSettings, resources); } /// Initializes a new instance of MachineLearningSweepJob. @@ -1889,6 +2542,8 @@ public static MachineLearningPipelineJob MachineLearningPipelineJob(string descr /// The available derived classes include , and . /// /// Is the asset archived?. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. @@ -1911,6 +2566,7 @@ public static MachineLearningPipelineJob MachineLearningPipelineJob(string descr /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// + /// Queue settings for the job. /// /// [Required] The hyperparameter sampling algorithm /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -1919,15 +2575,16 @@ public static MachineLearningPipelineJob MachineLearningPipelineJob(string descr /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. /// [Required] Trial component definition. /// A new instance for mocking. - public static MachineLearningSweepJob MachineLearningSweepJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, IDictionary services = null, MachineLearningJobStatus? status = null, MachineLearningEarlyTerminationPolicy earlyTermination = null, IDictionary inputs = null, MachineLearningSweepJobLimits limits = null, MachineLearningObjective objective = null, IDictionary outputs = null, SamplingAlgorithm samplingAlgorithm = null, BinaryData searchSpace = null, MachineLearningTrialComponent trial = null) + public static MachineLearningSweepJob MachineLearningSweepJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary secretsConfiguration = null, IDictionary services = null, MachineLearningJobStatus? status = null, MachineLearningEarlyTerminationPolicy earlyTermination = null, IDictionary inputs = null, MachineLearningSweepJobLimits limits = null, MachineLearningObjective objective = null, IDictionary outputs = null, JobQueueSettings queueSettings = null, SamplingAlgorithm samplingAlgorithm = null, BinaryData searchSpace = null, MachineLearningTrialComponent trial = null) { properties ??= new Dictionary(); tags ??= new Dictionary(); + secretsConfiguration ??= new Dictionary(); services ??= new Dictionary(); inputs ??= new Dictionary(); outputs ??= new Dictionary(); - return new MachineLearningSweepJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Sweep, services, status, earlyTermination, inputs, limits, objective, outputs, samplingAlgorithm, searchSpace, trial); + return new MachineLearningSweepJob(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, JobType.Sweep, notificationSetting, secretsConfiguration, services, status, earlyTermination, inputs, limits, objective, outputs, queueSettings, samplingAlgorithm, searchSpace, trial); } /// Initializes a new instance of TextClassificationMultilabel. @@ -1942,12 +2599,17 @@ public static MachineLearningSweepJob MachineLearningSweepJob(string description /// Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. /// /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Validation data inputs. /// A new instance for mocking. - public static TextClassificationMultilabel TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity = null, string targetColumnName = null, MachineLearningTableJobInput trainingData = null, ClassificationMultilabelPrimaryMetric? primaryMetric = null, string featurizationDatasetLanguage = null, NlpVerticalLimitSettings limitSettings = null, MachineLearningTableJobInput validationData = null) + public static TextClassificationMultilabel TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity = null, string targetColumnName = null, MachineLearningTableJobInput trainingData = null, ClassificationMultilabelPrimaryMetric? primaryMetric = null, string featurizationDatasetLanguage = null, NlpFixedParameters fixedParameters = null, NlpVerticalLimitSettings limitSettings = null, IEnumerable searchSpace = null, NlpSweepSettings sweepSettings = null, MachineLearningTableJobInput validationData = null) { - return new TextClassificationMultilabel(logVerbosity, targetColumnName, TaskType.TextClassificationMultilabel, trainingData, primaryMetric, featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage) : null, limitSettings, validationData); + searchSpace ??= new List(); + + return new TextClassificationMultilabel(logVerbosity, targetColumnName, TaskType.TextClassificationMultilabel, trainingData, primaryMetric, featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage) : null, fixedParameters, limitSettings, searchSpace?.ToList(), sweepSettings, validationData); } /// Initializes a new instance of TextNer. @@ -1962,12 +2624,31 @@ public static TextClassificationMultilabel TextClassificationMultilabel(MachineL /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. /// /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Validation data inputs. /// A new instance for mocking. - public static TextNer TextNer(MachineLearningLogVerbosity? logVerbosity = null, string targetColumnName = null, MachineLearningTableJobInput trainingData = null, ClassificationPrimaryMetric? primaryMetric = null, string featurizationDatasetLanguage = null, NlpVerticalLimitSettings limitSettings = null, MachineLearningTableJobInput validationData = null) + public static TextNer TextNer(MachineLearningLogVerbosity? logVerbosity = null, string targetColumnName = null, MachineLearningTableJobInput trainingData = null, ClassificationPrimaryMetric? primaryMetric = null, string featurizationDatasetLanguage = null, NlpFixedParameters fixedParameters = null, NlpVerticalLimitSettings limitSettings = null, IEnumerable searchSpace = null, NlpSweepSettings sweepSettings = null, MachineLearningTableJobInput validationData = null) + { + searchSpace ??= new List(); + + return new TextNer(logVerbosity, targetColumnName, TaskType.TextNER, trainingData, primaryMetric, featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage) : null, fixedParameters, limitSettings, searchSpace?.ToList(), sweepSettings, validationData); + } + + /// Initializes a new instance of ServiceTagDestination. + /// The action enum for networking rule. + /// Optional, if provided, the ServiceTag property will be ignored. + /// + /// + /// + /// A new instance for mocking. + public static ServiceTagDestination ServiceTagDestination(NetworkingRuleAction? action = null, IEnumerable addressPrefixes = null, string portRanges = null, string protocol = null, string serviceTag = null) { - return new TextNer(logVerbosity, targetColumnName, TaskType.TextNER, trainingData, primaryMetric, featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage) : null, limitSettings, validationData); + addressPrefixes ??= new List(); + + return new ServiceTagDestination(action, addressPrefixes?.ToList(), portRanges, protocol, serviceTag); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs index 24da8cb98d8ca..2f27418ea6cef 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs @@ -50,25 +50,6 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region MachineLearningWorkspaceResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - MachineLearningWorkspaceResource.ValidateResourceId(id); - return new MachineLearningWorkspaceResource(client, id); - } - ); - } - #endregion - #region MachineLearningComputeResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -88,134 +69,134 @@ public static MachineLearningComputeResource GetMachineLearningComputeResource(t } #endregion - #region MachineLearningPrivateEndpointConnectionResource + #region MachineLearningRegistryCodeContainerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningRegistryCodeContainerResource GetMachineLearningRegistryCodeContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningPrivateEndpointConnectionResource.ValidateResourceId(id); - return new MachineLearningPrivateEndpointConnectionResource(client, id); + MachineLearningRegistryCodeContainerResource.ValidateResourceId(id); + return new MachineLearningRegistryCodeContainerResource(client, id); } ); } #endregion - #region MachineLearningWorkspaceConnectionResource + #region MachineLearningCodeContainerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningCodeContainerResource GetMachineLearningCodeContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningWorkspaceConnectionResource.ValidateResourceId(id); - return new MachineLearningWorkspaceConnectionResource(client, id); + MachineLearningCodeContainerResource.ValidateResourceId(id); + return new MachineLearningCodeContainerResource(client, id); } ); } #endregion - #region MachineLearningBatchEndpointResource + #region MachineLearningRegistryCodeVersionResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningBatchEndpointResource GetMachineLearningBatchEndpointResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningRegistryCodeVersionResource GetMachineLearningRegistryCodeVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningBatchEndpointResource.ValidateResourceId(id); - return new MachineLearningBatchEndpointResource(client, id); + MachineLearningRegistryCodeVersionResource.ValidateResourceId(id); + return new MachineLearningRegistryCodeVersionResource(client, id); } ); } #endregion - #region MachineLearningBatchDeploymentResource + #region MachineLearningCodeVersionResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningBatchDeploymentResource GetMachineLearningBatchDeploymentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningCodeVersionResource GetMachineLearningCodeVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningBatchDeploymentResource.ValidateResourceId(id); - return new MachineLearningBatchDeploymentResource(client, id); + MachineLearningCodeVersionResource.ValidateResourceId(id); + return new MachineLearningCodeVersionResource(client, id); } ); } #endregion - #region MachineLearningCodeContainerResource + #region MachineLearninRegistryComponentContainerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningCodeContainerResource GetMachineLearningCodeContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearninRegistryComponentContainerResource GetMachineLearninRegistryComponentContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningCodeContainerResource.ValidateResourceId(id); - return new MachineLearningCodeContainerResource(client, id); + MachineLearninRegistryComponentContainerResource.ValidateResourceId(id); + return new MachineLearninRegistryComponentContainerResource(client, id); } ); } #endregion - #region MachineLearningCodeVersionResource + #region MachineLearningComponentContainerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningCodeVersionResource GetMachineLearningCodeVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningComponentContainerResource GetMachineLearningComponentContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningCodeVersionResource.ValidateResourceId(id); - return new MachineLearningCodeVersionResource(client, id); + MachineLearningComponentContainerResource.ValidateResourceId(id); + return new MachineLearningComponentContainerResource(client, id); } ); } #endregion - #region MachineLearningComponentContainerResource + #region MachineLearninRegistryComponentVersionResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningComponentContainerResource GetMachineLearningComponentContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearninRegistryComponentVersionResource GetMachineLearninRegistryComponentVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningComponentContainerResource.ValidateResourceId(id); - return new MachineLearningComponentContainerResource(client, id); + MachineLearninRegistryComponentVersionResource.ValidateResourceId(id); + return new MachineLearninRegistryComponentVersionResource(client, id); } ); } @@ -240,6 +221,25 @@ public static MachineLearningComponentVersionResource GetMachineLearningComponen } #endregion + #region MachineLearningRegistryDataContainerResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningRegistryDataContainerResource GetMachineLearningRegistryDataContainerResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningRegistryDataContainerResource.ValidateResourceId(id); + return new MachineLearningRegistryDataContainerResource(client, id); + } + ); + } + #endregion + #region MachineLearningDataContainerResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -259,6 +259,25 @@ public static MachineLearningDataContainerResource GetMachineLearningDataContain } #endregion + #region MachineLearningRegistryDataVersionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningRegistryDataVersionResource GetMachineLearningRegistryDataVersionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningRegistryDataVersionResource.ValidateResourceId(id); + return new MachineLearningRegistryDataVersionResource(client, id); + } + ); + } + #endregion + #region MachineLearningDataVersionResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -278,20 +297,20 @@ public static MachineLearningDataVersionResource GetMachineLearningDataVersionRe } #endregion - #region MachineLearningDatastoreResource + #region MachineLearningRegistryEnvironmentContainerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningDatastoreResource GetMachineLearningDatastoreResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningRegistryEnvironmentContainerResource GetMachineLearningRegistryEnvironmentContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningDatastoreResource.ValidateResourceId(id); - return new MachineLearningDatastoreResource(client, id); + MachineLearningRegistryEnvironmentContainerResource.ValidateResourceId(id); + return new MachineLearningRegistryEnvironmentContainerResource(client, id); } ); } @@ -316,6 +335,25 @@ public static MachineLearningEnvironmentContainerResource GetMachineLearningEnvi } #endregion + #region MachineLearningRegistryEnvironmentVersionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningRegistryEnvironmentVersionResource GetMachineLearningRegistryEnvironmentVersionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningRegistryEnvironmentVersionResource.ValidateResourceId(id); + return new MachineLearningRegistryEnvironmentVersionResource(client, id); + } + ); + } + #endregion + #region MachineLearningEnvironmentVersionResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -335,20 +373,20 @@ public static MachineLearningEnvironmentVersionResource GetMachineLearningEnviro } #endregion - #region MachineLearningJobResource + #region MachineLearningRegistryModelContainerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static MachineLearningJobResource GetMachineLearningJobResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningRegistryModelContainerResource GetMachineLearningRegistryModelContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - MachineLearningJobResource.ValidateResourceId(id); - return new MachineLearningJobResource(client, id); + MachineLearningRegistryModelContainerResource.ValidateResourceId(id); + return new MachineLearningRegistryModelContainerResource(client, id); } ); } @@ -373,6 +411,25 @@ public static MachineLearningModelContainerResource GetMachineLearningModelConta } #endregion + #region MachineLearningRegistryModelVersionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningRegistryModelVersionResource GetMachineLearningRegistryModelVersionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningRegistryModelVersionResource.ValidateResourceId(id); + return new MachineLearningRegistryModelVersionResource(client, id); + } + ); + } + #endregion + #region MachineLearningModelVersionResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -392,6 +449,196 @@ public static MachineLearningModelVersionResource GetMachineLearningModelVersion } #endregion + #region MachineLearningBatchEndpointResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningBatchEndpointResource GetMachineLearningBatchEndpointResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningBatchEndpointResource.ValidateResourceId(id); + return new MachineLearningBatchEndpointResource(client, id); + } + ); + } + #endregion + + #region MachineLearningBatchDeploymentResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningBatchDeploymentResource GetMachineLearningBatchDeploymentResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningBatchDeploymentResource.ValidateResourceId(id); + return new MachineLearningBatchDeploymentResource(client, id); + } + ); + } + #endregion + + #region MachineLearningDatastoreResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningDatastoreResource GetMachineLearningDatastoreResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningDatastoreResource.ValidateResourceId(id); + return new MachineLearningDatastoreResource(client, id); + } + ); + } + #endregion + + #region MachineLearningFeatureSetContainerResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningFeatureSetContainerResource GetMachineLearningFeatureSetContainerResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningFeatureSetContainerResource.ValidateResourceId(id); + return new MachineLearningFeatureSetContainerResource(client, id); + } + ); + } + #endregion + + #region MachineLearningFeatureResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningFeatureResource GetMachineLearningFeatureResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningFeatureResource.ValidateResourceId(id); + return new MachineLearningFeatureResource(client, id); + } + ); + } + #endregion + + #region MachineLearningFeatureSetVersionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningFeatureSetVersionResource GetMachineLearningFeatureSetVersionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningFeatureSetVersionResource.ValidateResourceId(id); + return new MachineLearningFeatureSetVersionResource(client, id); + } + ); + } + #endregion + + #region MachineLearningFeatureStoreEntityContainerResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningFeatureStoreEntityContainerResource GetMachineLearningFeatureStoreEntityContainerResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningFeatureStoreEntityContainerResource.ValidateResourceId(id); + return new MachineLearningFeatureStoreEntityContainerResource(client, id); + } + ); + } + #endregion + + #region MachineLearningFeaturestoreEntityVersionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningFeaturestoreEntityVersionResource GetMachineLearningFeaturestoreEntityVersionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningFeaturestoreEntityVersionResource.ValidateResourceId(id); + return new MachineLearningFeaturestoreEntityVersionResource(client, id); + } + ); + } + #endregion + + #region MachineLearningJobResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningJobResource GetMachineLearningJobResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningJobResource.ValidateResourceId(id); + return new MachineLearningJobResource(client, id); + } + ); + } + #endregion + + #region MachineLearningLabelingJobResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningLabelingJobResource GetMachineLearningLabelingJobResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningLabelingJobResource.ValidateResourceId(id); + return new MachineLearningLabelingJobResource(client, id); + } + ); + } + #endregion + #region MachineLearningOnlineEndpointResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -449,104 +696,211 @@ public static MachineLearningScheduleResource GetMachineLearningScheduleResource } #endregion - /// Gets a collection of MachineLearningWorkspaceResources in the ResourceGroupResource. + #region MachineLearningRegistryResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningRegistryResource GetMachineLearningRegistryResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningRegistryResource.ValidateResourceId(id); + return new MachineLearningRegistryResource(client, id); + } + ); + } + #endregion + + #region MachineLearningWorkspaceResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningWorkspaceResource.ValidateResourceId(id); + return new MachineLearningWorkspaceResource(client, id); + } + ); + } + #endregion + + #region MachineLearningWorkspaceConnectionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningWorkspaceConnectionResource.ValidateResourceId(id); + return new MachineLearningWorkspaceConnectionResource(client, id); + } + ); + } + #endregion + + #region MachineLearningOutboundRuleBasicResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningOutboundRuleBasicResource GetMachineLearningOutboundRuleBasicResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningOutboundRuleBasicResource.ValidateResourceId(id); + return new MachineLearningOutboundRuleBasicResource(client, id); + } + ); + } + #endregion + + #region MachineLearningPrivateEndpointConnectionResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + MachineLearningPrivateEndpointConnectionResource.ValidateResourceId(id); + return new MachineLearningPrivateEndpointConnectionResource(client, id); + } + ); + } + #endregion + + /// Gets a collection of MachineLearningRegistryResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of MachineLearningWorkspaceResources and their operations over a MachineLearningWorkspaceResource. - public static MachineLearningWorkspaceCollection GetMachineLearningWorkspaces(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of MachineLearningRegistryResources and their operations over a MachineLearningRegistryResource. + public static MachineLearningRegistryCollection GetMachineLearningRegistries(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetMachineLearningWorkspaces(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetMachineLearningRegistries(); } /// - /// Gets the properties of the specified machine learning workspace. + /// Get registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} /// /// /// Operation Id - /// Workspaces_Get + /// Registries_Get /// /// /// /// The instance the method will execute against. - /// Name of Azure Machine Learning workspace. + /// Name of Azure Machine Learning registry. This is case-insensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static async Task> GetMachineLearningWorkspaceAsync(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) + public static async Task> GetMachineLearningRegistryAsync(this ResourceGroupResource resourceGroupResource, string registryName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetMachineLearningWorkspaces().GetAsync(workspaceName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetMachineLearningRegistries().GetAsync(registryName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the properties of the specified machine learning workspace. + /// Get registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} /// /// /// Operation Id - /// Workspaces_Get + /// Registries_Get /// /// /// /// The instance the method will execute against. - /// Name of Azure Machine Learning workspace. + /// Name of Azure Machine Learning registry. This is case-insensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static Response GetMachineLearningWorkspace(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) + public static Response GetMachineLearningRegistry(this ResourceGroupResource resourceGroupResource, string registryName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetMachineLearningWorkspaces().Get(workspaceName, cancellationToken); + return resourceGroupResource.GetMachineLearningRegistries().Get(registryName, cancellationToken); + } + + /// Gets a collection of MachineLearningWorkspaceResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of MachineLearningWorkspaceResources and their operations over a MachineLearningWorkspaceResource. + public static MachineLearningWorkspaceCollection GetMachineLearningWorkspaces(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetMachineLearningWorkspaces(); } /// - /// Lists all the available machine learning workspaces under the specified subscription. + /// Gets the properties of the specified machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// Workspaces_ListBySubscription + /// Workspaces_Get /// /// /// - /// The instance the method will execute against. - /// Continuation token for pagination. + /// The instance the method will execute against. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetMachineLearningWorkspacesAsync(this SubscriptionResource subscriptionResource, string skip = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetMachineLearningWorkspaceAsync(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMachineLearningWorkspacesAsync(skip, cancellationToken); + return await resourceGroupResource.GetMachineLearningWorkspaces().GetAsync(workspaceName, cancellationToken).ConfigureAwait(false); } /// - /// Lists all the available machine learning workspaces under the specified subscription. + /// Gets the properties of the specified machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// Workspaces_ListBySubscription + /// Workspaces_Get /// /// /// - /// The instance the method will execute against. - /// Continuation token for pagination. + /// The instance the method will execute against. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetMachineLearningWorkspaces(this SubscriptionResource subscriptionResource, string skip = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetMachineLearningWorkspace(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMachineLearningWorkspaces(skip, cancellationToken); + return resourceGroupResource.GetMachineLearningWorkspaces().Get(workspaceName, cancellationToken); } /// @@ -732,5 +1086,93 @@ public static Pageable GetMachineLearningQuotas(th { return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMachineLearningQuotas(location, cancellationToken); } + + /// + /// List registries by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries + /// + /// + /// Operation Id + /// Registries_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMachineLearningRegistriesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMachineLearningRegistriesAsync(cancellationToken); + } + + /// + /// List registries by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries + /// + /// + /// Operation Id + /// Registries_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMachineLearningRegistries(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMachineLearningRegistries(cancellationToken); + } + + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token for pagination. + /// Kind of workspace. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMachineLearningWorkspacesAsync(this SubscriptionResource subscriptionResource, string skip = null, string kind = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMachineLearningWorkspacesAsync(skip, kind, cancellationToken); + } + + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token for pagination. + /// Kind of workspace. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMachineLearningWorkspaces(this SubscriptionResource subscriptionResource, string skip = null, string kind = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetMachineLearningWorkspaces(skip, kind, cancellationToken); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 4685a8460ad56..ecfc3a6b3627b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -31,6 +31,13 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// Gets a collection of MachineLearningRegistryResources in the ResourceGroupResource. + /// An object representing collection of MachineLearningRegistryResources and their operations over a MachineLearningRegistryResource. + public virtual MachineLearningRegistryCollection GetMachineLearningRegistries() + { + return GetCachedClient(Client => new MachineLearningRegistryCollection(Client, Id)); + } + /// Gets a collection of MachineLearningWorkspaceResources in the ResourceGroupResource. /// An object representing collection of MachineLearningWorkspaceResources and their operations over a MachineLearningWorkspaceResource. public virtual MachineLearningWorkspaceCollection GetMachineLearningWorkspaces() diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 5e7bbfede1d6a..e01328541757a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -18,14 +18,16 @@ namespace Azure.ResourceManager.MachineLearning /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _machineLearningWorkspaceWorkspacesClientDiagnostics; - private WorkspacesRestOperations _machineLearningWorkspaceWorkspacesRestClient; private ClientDiagnostics _usagesClientDiagnostics; private UsagesRestOperations _usagesRestClient; private ClientDiagnostics _virtualMachineSizesClientDiagnostics; private VirtualMachineSizesRestOperations _virtualMachineSizesRestClient; private ClientDiagnostics _quotasClientDiagnostics; private QuotasRestOperations _quotasRestClient; + private ClientDiagnostics _machineLearningRegistryRegistriesClientDiagnostics; + private RegistriesRestOperations _machineLearningRegistryRegistriesRestClient; + private ClientDiagnostics _machineLearningWorkspaceWorkspacesClientDiagnostics; + private WorkspacesRestOperations _machineLearningWorkspaceWorkspacesRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -39,14 +41,16 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics MachineLearningWorkspaceWorkspacesClientDiagnostics => _machineLearningWorkspaceWorkspacesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningWorkspaceResource.ResourceType.Namespace, Diagnostics); - private WorkspacesRestOperations MachineLearningWorkspaceWorkspacesRestClient => _machineLearningWorkspaceWorkspacesRestClient ??= new WorkspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MachineLearningWorkspaceResource.ResourceType)); private ClientDiagnostics UsagesClientDiagnostics => _usagesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); private UsagesRestOperations UsagesRestClient => _usagesRestClient ??= new UsagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics VirtualMachineSizesClientDiagnostics => _virtualMachineSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); private VirtualMachineSizesRestOperations VirtualMachineSizesRestClient => _virtualMachineSizesRestClient ??= new VirtualMachineSizesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics QuotasClientDiagnostics => _quotasClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); private QuotasRestOperations QuotasRestClient => _quotasRestClient ??= new QuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics MachineLearningRegistryRegistriesClientDiagnostics => _machineLearningRegistryRegistriesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryResource.ResourceType.Namespace, Diagnostics); + private RegistriesRestOperations MachineLearningRegistryRegistriesRestClient => _machineLearningRegistryRegistriesRestClient ??= new RegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MachineLearningRegistryResource.ResourceType)); + private ClientDiagnostics MachineLearningWorkspaceWorkspacesClientDiagnostics => _machineLearningWorkspaceWorkspacesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningWorkspaceResource.ResourceType.Namespace, Diagnostics); + private WorkspacesRestOperations MachineLearningWorkspaceWorkspacesRestClient => _machineLearningWorkspaceWorkspacesRestClient ??= new WorkspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MachineLearningWorkspaceResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -54,52 +58,6 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// - /// Continuation token for pagination. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetMachineLearningWorkspacesAsync(string skip = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skip); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetMachineLearningWorkspaces(string skip = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skip); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); - } - /// /// Gets the current usage information as well as limits for AML resources for given subscription and location. /// @@ -281,5 +239,97 @@ public virtual Pageable GetMachineLearningQuotas(A HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => QuotasRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, MachineLearningResourceQuota.DeserializeMachineLearningResourceQuota, QuotasClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMachineLearningQuotas", "value", "nextLink", cancellationToken); } + + /// + /// List registries by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries + /// + /// + /// Operation Id + /// Registries_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMachineLearningRegistriesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningRegistryRegistriesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningRegistryRegistriesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryResource(Client, MachineLearningRegistryData.DeserializeMachineLearningRegistryData(e)), MachineLearningRegistryRegistriesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMachineLearningRegistries", "value", "nextLink", cancellationToken); + } + + /// + /// List registries by subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries + /// + /// + /// Operation Id + /// Registries_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMachineLearningRegistries(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningRegistryRegistriesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningRegistryRegistriesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryResource(Client, MachineLearningRegistryData.DeserializeMachineLearningRegistryData(e)), MachineLearningRegistryRegistriesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMachineLearningRegistries", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// + /// Continuation token for pagination. + /// Kind of workspace. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMachineLearningWorkspacesAsync(string skip = null, string kind = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skip, kind); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skip, kind); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// + /// Continuation token for pagination. + /// Kind of workspace. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMachineLearningWorkspaces(string skip = null, string kind = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skip, kind); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skip, kind); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ExportSummaryOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ExportSummaryOperationSource.cs new file mode 100644 index 0000000000000..88b76ee464b8c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ExportSummaryOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class ExportSummaryOperationSource : IOperationSource + { + ExportSummary IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ExportSummary.DeserializeExportSummary(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ExportSummary.DeserializeExportSummary(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentContainerOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentContainerOperationSource.cs new file mode 100644 index 0000000000000..788b75a0cd0f9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentContainerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearninRegistryComponentContainerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearninRegistryComponentContainerOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearninRegistryComponentContainerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); + return new MachineLearninRegistryComponentContainerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); + return new MachineLearninRegistryComponentContainerResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentVersionOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentVersionOperationSource.cs new file mode 100644 index 0000000000000..5be3c2c72135d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearninRegistryComponentVersionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearninRegistryComponentVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearninRegistryComponentVersionOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearninRegistryComponentVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); + return new MachineLearninRegistryComponentVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); + return new MachineLearninRegistryComponentVersionResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetContainerOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetContainerOperationSource.cs new file mode 100644 index 0000000000000..22a9bcc5be8e1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetContainerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningFeatureSetContainerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningFeatureSetContainerOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningFeatureSetContainerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningFeatureSetContainerData.DeserializeMachineLearningFeatureSetContainerData(document.RootElement); + return new MachineLearningFeatureSetContainerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningFeatureSetContainerData.DeserializeMachineLearningFeatureSetContainerData(document.RootElement); + return new MachineLearningFeatureSetContainerResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetJobOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetJobOperationSource.cs new file mode 100644 index 0000000000000..6efc3616279eb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetJobOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningFeatureSetJobOperationSource : IOperationSource + { + MachineLearningFeatureSetJob IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return MachineLearningFeatureSetJob.DeserializeMachineLearningFeatureSetJob(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return MachineLearningFeatureSetJob.DeserializeMachineLearningFeatureSetJob(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetVersionOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetVersionOperationSource.cs new file mode 100644 index 0000000000000..8fe6ea8cd53cf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureSetVersionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningFeatureSetVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningFeatureSetVersionOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningFeatureSetVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningFeatureSetVersionData.DeserializeMachineLearningFeatureSetVersionData(document.RootElement); + return new MachineLearningFeatureSetVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningFeatureSetVersionData.DeserializeMachineLearningFeatureSetVersionData(document.RootElement); + return new MachineLearningFeatureSetVersionResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureStoreEntityContainerOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureStoreEntityContainerOperationSource.cs new file mode 100644 index 0000000000000..93a1882259044 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeatureStoreEntityContainerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningFeatureStoreEntityContainerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningFeatureStoreEntityContainerOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningFeatureStoreEntityContainerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningFeatureStoreEntityContainerData.DeserializeMachineLearningFeatureStoreEntityContainerData(document.RootElement); + return new MachineLearningFeatureStoreEntityContainerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningFeatureStoreEntityContainerData.DeserializeMachineLearningFeatureStoreEntityContainerData(document.RootElement); + return new MachineLearningFeatureStoreEntityContainerResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeaturestoreEntityVersionOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeaturestoreEntityVersionOperationSource.cs new file mode 100644 index 0000000000000..9e9f64fb01c69 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningFeaturestoreEntityVersionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningFeaturestoreEntityVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningFeaturestoreEntityVersionOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningFeaturestoreEntityVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningFeaturestoreEntityVersionData.DeserializeMachineLearningFeaturestoreEntityVersionData(document.RootElement); + return new MachineLearningFeaturestoreEntityVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningFeaturestoreEntityVersionData.DeserializeMachineLearningFeaturestoreEntityVersionData(document.RootElement); + return new MachineLearningFeaturestoreEntityVersionResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningLabelingJobOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningLabelingJobOperationSource.cs new file mode 100644 index 0000000000000..221c7b6f97805 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningLabelingJobOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningLabelingJobOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningLabelingJobOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningLabelingJobResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningLabelingJobData.DeserializeMachineLearningLabelingJobData(document.RootElement); + return new MachineLearningLabelingJobResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningLabelingJobData.DeserializeMachineLearningLabelingJobData(document.RootElement); + return new MachineLearningLabelingJobResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOutboundRuleBasicOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOutboundRuleBasicOperationSource.cs new file mode 100644 index 0000000000000..e8be0633ac6a3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOutboundRuleBasicOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningOutboundRuleBasicOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningOutboundRuleBasicOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningOutboundRuleBasicResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningOutboundRuleBasicData.DeserializeMachineLearningOutboundRuleBasicData(document.RootElement); + return new MachineLearningOutboundRuleBasicResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningOutboundRuleBasicData.DeserializeMachineLearningOutboundRuleBasicData(document.RootElement); + return new MachineLearningOutboundRuleBasicResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeContainerOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeContainerOperationSource.cs new file mode 100644 index 0000000000000..5e777c925829c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeContainerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryCodeContainerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryCodeContainerOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryCodeContainerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); + return new MachineLearningRegistryCodeContainerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); + return new MachineLearningRegistryCodeContainerResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeVersionOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeVersionOperationSource.cs new file mode 100644 index 0000000000000..64eb744820d87 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryCodeVersionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryCodeVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryCodeVersionOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryCodeVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); + return new MachineLearningRegistryCodeVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); + return new MachineLearningRegistryCodeVersionResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataContainerOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataContainerOperationSource.cs new file mode 100644 index 0000000000000..2926a0e19ea32 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataContainerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryDataContainerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryDataContainerOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryDataContainerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); + return new MachineLearningRegistryDataContainerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); + return new MachineLearningRegistryDataContainerResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataVersionOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataVersionOperationSource.cs new file mode 100644 index 0000000000000..58b34868fe7bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryDataVersionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryDataVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryDataVersionOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryDataVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); + return new MachineLearningRegistryDataVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); + return new MachineLearningRegistryDataVersionResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentContainerOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentContainerOperationSource.cs new file mode 100644 index 0000000000000..cc0de1aa2343c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentContainerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryEnvironmentContainerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryEnvironmentContainerOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryEnvironmentContainerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); + return new MachineLearningRegistryEnvironmentContainerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); + return new MachineLearningRegistryEnvironmentContainerResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentVersionOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentVersionOperationSource.cs new file mode 100644 index 0000000000000..7520562223f05 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryEnvironmentVersionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryEnvironmentVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryEnvironmentVersionOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryEnvironmentVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); + return new MachineLearningRegistryEnvironmentVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); + return new MachineLearningRegistryEnvironmentVersionResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelContainerOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelContainerOperationSource.cs new file mode 100644 index 0000000000000..11df8d8a33b42 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelContainerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryModelContainerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryModelContainerOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryModelContainerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); + return new MachineLearningRegistryModelContainerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); + return new MachineLearningRegistryModelContainerResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelVersionOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelVersionOperationSource.cs new file mode 100644 index 0000000000000..c64978f7319e8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryModelVersionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryModelVersionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryModelVersionOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryModelVersionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); + return new MachineLearningRegistryModelVersionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); + return new MachineLearningRegistryModelVersionResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryOperationSource.cs new file mode 100644 index 0000000000000..e033902dd5fc1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningRegistryOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningRegistryOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningRegistryOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningRegistryResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningRegistryData.DeserializeMachineLearningRegistryData(document.RootElement); + return new MachineLearningRegistryResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningRegistryData.DeserializeMachineLearningRegistryData(document.RootElement); + return new MachineLearningRegistryResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ManagedNetworkProvisionStatusOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ManagedNetworkProvisionStatusOperationSource.cs new file mode 100644 index 0000000000000..0452f51d71e71 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ManagedNetworkProvisionStatusOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class ManagedNetworkProvisionStatusOperationSource : IOperationSource + { + ManagedNetworkProvisionStatus IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ManagedNetworkProvisionStatus.DeserializeManagedNetworkProvisionStatus(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ManagedNetworkProvisionStatus.DeserializeManagedNetworkProvisionStatus(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ModelPackageResultOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ModelPackageResultOperationSource.cs new file mode 100644 index 0000000000000..5ad0b15847987 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ModelPackageResultOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class ModelPackageResultOperationSource : IOperationSource + { + ModelPackageResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ModelPackageResult.DeserializeModelPackageResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ModelPackageResult.DeserializeModelPackageResult(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs new file mode 100644 index 0000000000000..bbe00f2669fe4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearninRegistryComponentContainers method from an instance of . + /// + public partial class MachineLearninRegistryComponentContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics; + private readonly RegistryComponentContainersRestOperations _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearninRegistryComponentContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearninRegistryComponentContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearninRegistryComponentContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearninRegistryComponentContainerResource.ResourceType, out string machineLearninRegistryComponentContainerRegistryComponentContainersApiVersion); + _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient = new RegistryComponentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearninRegistryComponentContainerRegistryComponentContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryResource.ResourceType), nameof(id)); + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string componentName, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentContainerOperationSource(Client), _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string componentName, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentContainerOperationSource(Client), _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components + /// + /// + /// Operation Id + /// RegistryComponentContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearninRegistryComponentContainerResource(Client, MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(e)), _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, "MachineLearninRegistryComponentContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components + /// + /// + /// Operation Id + /// RegistryComponentContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearninRegistryComponentContainerResource(Client, MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(e)), _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, "MachineLearninRegistryComponentContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, componentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs new file mode 100644 index 0000000000000..02bdeb110e1a2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearninRegistryComponentContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearninRegistryComponentContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearninRegistryComponentContainer method. + /// + public partial class MachineLearninRegistryComponentContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string componentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics; + private readonly RegistryComponentContainersRestOperations _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient; + private readonly MachineLearningComponentContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearninRegistryComponentContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearninRegistryComponentContainerResource(ArmClient client, MachineLearningComponentContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearninRegistryComponentContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearninRegistryComponentContainerRegistryComponentContainersApiVersion); + _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient = new RegistryComponentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearninRegistryComponentContainerRegistryComponentContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/components"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningComponentContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearninRegistryComponentVersionResources in the MachineLearninRegistryComponentContainer. + /// An object representing collection of MachineLearninRegistryComponentVersionResources and their operations over a MachineLearninRegistryComponentVersionResource. + public virtual MachineLearninRegistryComponentVersionCollection GetMachineLearninRegistryComponentVersions() + { + return GetCachedClient(Client => new MachineLearninRegistryComponentVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearninRegistryComponentVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearninRegistryComponentVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearninRegistryComponentVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearninRegistryComponentVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentContainerOperationSource(Client), _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics.CreateScope("MachineLearninRegistryComponentContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentContainerOperationSource(Client), _machineLearninRegistryComponentContainerRegistryComponentContainersClientDiagnostics, Pipeline, _machineLearninRegistryComponentContainerRegistryComponentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs new file mode 100644 index 0000000000000..4665c077e2350 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearninRegistryComponentVersions method from an instance of . + /// + public partial class MachineLearninRegistryComponentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics; + private readonly RegistryComponentVersionsRestOperations _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearninRegistryComponentVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearninRegistryComponentVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearninRegistryComponentVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearninRegistryComponentVersionResource.ResourceType, out string machineLearninRegistryComponentVersionRegistryComponentVersionsApiVersion); + _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient = new RegistryComponentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearninRegistryComponentVersionRegistryComponentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearninRegistryComponentContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearninRegistryComponentContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentVersionOperationSource(Client), _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentVersionOperationSource(Client), _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions + /// + /// + /// Operation Id + /// RegistryComponentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// Component stage. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string stage = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, stage); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearninRegistryComponentVersionResource(Client, MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(e)), _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, "MachineLearninRegistryComponentVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions + /// + /// + /// Operation Id + /// RegistryComponentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// Component stage. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string stage = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, stage); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearninRegistryComponentVersionResource(Client, MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(e)), _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, "MachineLearninRegistryComponentVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs new file mode 100644 index 0000000000000..c6376fbbddb54 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearninRegistryComponentVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearninRegistryComponentVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearninRegistryComponentVersion method. + /// + public partial class MachineLearninRegistryComponentVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics; + private readonly RegistryComponentVersionsRestOperations _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient; + private readonly MachineLearningComponentVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearninRegistryComponentVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearninRegistryComponentVersionResource(ArmClient client, MachineLearningComponentVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearninRegistryComponentVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearninRegistryComponentVersionRegistryComponentVersionsApiVersion); + _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient = new RegistryComponentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearninRegistryComponentVersionRegistryComponentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/components/versions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningComponentVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearninRegistryComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentVersionOperationSource(Client), _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryComponentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics.CreateScope("MachineLearninRegistryComponentVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearninRegistryComponentVersionOperationSource(Client), _machineLearninRegistryComponentVersionRegistryComponentVersionsClientDiagnostics, Pipeline, _machineLearninRegistryComponentVersionRegistryComponentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs index 758467815782e..02fdf7448c0fd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs @@ -82,7 +82,7 @@ public virtual async Task> try { var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -123,7 +123,7 @@ public virtual ArmOperation CreateOrUpda try { var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs index a996cc06b16a7..2b844d75579bb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs @@ -82,7 +82,7 @@ public virtual async Task> Cr try { var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -123,7 +123,7 @@ public virtual ArmOperation CreateOrUpdate try { var response = _machineLearningBatchEndpointBatchEndpointsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs index 39e6d0f3bb6e3..5a7f5cb7c156e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs @@ -225,12 +225,14 @@ public virtual Response Get(string version, /// Ordering of list. /// Maximum number of records to return. /// Continuation token for pagination. + /// If specified, return CodeVersion assets with specified content hash value, regardless of name. + /// Hash algorithm version when listing by hash. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string hash = null, string hashVersion = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, hash, hashVersion); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, hash, hashVersion); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningCodeVersionResource(Client, MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(e)), _machineLearningCodeVersionCodeVersionsClientDiagnostics, Pipeline, "MachineLearningCodeVersionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -250,12 +252,14 @@ public virtual AsyncPageable GetAllAsync(str /// Ordering of list. /// Maximum number of records to return. /// Continuation token for pagination. + /// If specified, return CodeVersion assets with specified content hash value, regardless of name. + /// Hash algorithm version when listing by hash. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string hash = null, string hashVersion = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, hash, hashVersion); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningCodeVersionCodeVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, hash, hashVersion); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningCodeVersionResource(Client, MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(e)), _machineLearningCodeVersionCodeVersionsClientDiagnostics, Pipeline, "MachineLearningCodeVersionCollection.GetAll", "value", "nextLink", cancellationToken); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs index 982ed0ac37e19..7ba137c50f49f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs @@ -13,6 +13,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; namespace Azure.ResourceManager.MachineLearning { @@ -293,5 +294,73 @@ public virtual ArmOperation Update(WaitUntil throw; } } + + /// + /// Generate a storage location and credential for the client to upload a code asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// CodeVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrGetStartPendingUploadAsync(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.CreateOrGetStartPendingUploadAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate a storage location and credential for the client to upload a code asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// CodeVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual Response CreateOrGetStartPendingUpload(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.CreateOrGetStartPendingUpload(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs index 01f9663bceceb..98184c92485e0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs @@ -227,12 +227,13 @@ public virtual Response Get(string vers /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Component stage. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningComponentVersionResource(Client, MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(e)), _machineLearningComponentVersionComponentVersionsClientDiagnostics, Pipeline, "MachineLearningComponentVersionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -253,12 +254,13 @@ public virtual AsyncPageable GetAllAsyn /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Component stage. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningComponentVersionComponentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningComponentVersionResource(Client, MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(e)), _machineLearningComponentVersionComponentVersionsClientDiagnostics, Pipeline, "MachineLearningComponentVersionCollection.GetAll", "value", "nextLink", cancellationToken); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs index c46d8772dcd67..befaf9255fa46 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -298,6 +299,74 @@ public virtual ArmOperation Update(WaitUntil wai } } + /// + /// Updates the custom services list. The list of custom services provided shall be overwritten + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices + /// + /// + /// Operation Id + /// Compute_UpdateCustomServices + /// + /// + /// + /// New list of Custom Services. + /// The cancellation token to use. + /// is null. + public virtual async Task UpdateCustomServicesAsync(IEnumerable customServices, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(customServices, nameof(customServices)); + + using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateCustomServices"); + scope.Start(); + try + { + var response = await _machineLearningComputeComputeRestClient.UpdateCustomServicesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customServices, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the custom services list. The list of custom services provided shall be overwritten + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices + /// + /// + /// Operation Id + /// Compute_UpdateCustomServices + /// + /// + /// + /// New list of Custom Services. + /// The cancellation token to use. + /// is null. + public virtual Response UpdateCustomServices(IEnumerable customServices, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(customServices, nameof(customServices)); + + using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateCustomServices"); + scope.Start(); + try + { + var response = _machineLearningComputeComputeRestClient.UpdateCustomServices(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customServices, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. /// @@ -605,5 +674,73 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance throw; } } + + /// + /// Updates the idle shutdown setting of a compute instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting + /// + /// + /// Operation Id + /// Compute_UpdateIdleShutdownSetting + /// + /// + /// + /// The object for updating idle shutdown setting of specified ComputeInstance. + /// The cancellation token to use. + /// is null. + public virtual async Task UpdateIdleShutdownSettingAsync(IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); + + using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateIdleShutdownSetting"); + scope.Start(); + try + { + var response = await _machineLearningComputeComputeRestClient.UpdateIdleShutdownSettingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, idleShutdownSetting, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the idle shutdown setting of a compute instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting + /// + /// + /// Operation Id + /// Compute_UpdateIdleShutdownSetting + /// + /// + /// + /// The object for updating idle shutdown setting of specified ComputeInstance. + /// The cancellation token to use. + /// is null. + public virtual Response UpdateIdleShutdownSetting(IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); + + using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateIdleShutdownSetting"); + scope.Start(); + try + { + var response = _machineLearningComputeComputeRestClient.UpdateIdleShutdownSetting(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, idleShutdownSetting, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs index 744e7cbf7c417..fd34e9d288e74 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs @@ -223,20 +223,15 @@ public virtual Response Get(string version, /// /// /// - /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. - /// - /// Top count of results, top count cannot be greater than the page size. - /// If topCount > page size, results with be default page size count will be returned - /// - /// Continuation token for pagination. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(MachineLearningDataVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningDataVersionDataVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningDataVersionDataVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); + options ??= new MachineLearningDataVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningDataVersionDataVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.OrderBy, options.Top, options.Skip, options.Tags, options.ListViewType, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningDataVersionDataVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.OrderBy, options.Top, options.Skip, options.Tags, options.ListViewType, options.Stage); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningDataVersionResource(Client, MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(e)), _machineLearningDataVersionDataVersionsClientDiagnostics, Pipeline, "MachineLearningDataVersionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -253,20 +248,15 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// - /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. - /// - /// Top count of results, top count cannot be greater than the page size. - /// If topCount > page size, results with be default page size count will be returned - /// - /// Continuation token for pagination. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(MachineLearningDataVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningDataVersionDataVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningDataVersionDataVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); + options ??= new MachineLearningDataVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningDataVersionDataVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.OrderBy, options.Top, options.Skip, options.Tags, options.ListViewType, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningDataVersionDataVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.OrderBy, options.Top, options.Skip, options.Tags, options.ListViewType, options.Stage); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningDataVersionResource(Client, MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(e)), _machineLearningDataVersionDataVersionsClientDiagnostics, Pipeline, "MachineLearningDataVersionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -416,17 +406,17 @@ public virtual NullableResponse GetIfExists( IEnumerator IEnumerable.GetEnumerator() { - return GetAll().GetEnumerator(); + return GetAll(options: null).GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { - return GetAll().GetEnumerator(); + return GetAll(options: null).GetEnumerator(); } IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + return GetAllAsync(options: null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreData.cs index 2f222e5e49045..1a41ef9ab780d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreData.cs @@ -22,7 +22,7 @@ public partial class MachineLearningDatastoreData : ResourceData /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// /// is null. public MachineLearningDatastoreData(MachineLearningDatastoreProperties properties) @@ -40,7 +40,7 @@ public MachineLearningDatastoreData(MachineLearningDatastoreProperties propertie /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// internal MachineLearningDatastoreData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningDatastoreProperties properties) : base(id, name, resourceType, systemData) { @@ -50,7 +50,7 @@ internal MachineLearningDatastoreData(ResourceIdentifier id, string name, Resour /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// public MachineLearningDatastoreProperties Properties { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs index 115252f3d0ebd..948ff9ca802c0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs @@ -227,12 +227,13 @@ public virtual Response Get(string ve /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningEnvironmentVersionResource(Client, MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(e)), _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics, Pipeline, "MachineLearningEnvironmentVersionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -253,12 +254,13 @@ public virtual AsyncPageable GetAllAs /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningEnvironmentVersionResource(Client, MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(e)), _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics, Pipeline, "MachineLearningEnvironmentVersionCollection.GetAll", "value", "nextLink", cancellationToken); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs new file mode 100644 index 0000000000000..5d394373be256 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningFeatures method from an instance of . + /// + public partial class MachineLearningFeatureCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningFeatureFeaturesClientDiagnostics; + private readonly FeaturesRestOperations _machineLearningFeatureFeaturesRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningFeatureCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureFeaturesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningFeatureResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningFeatureResource.ResourceType, out string machineLearningFeatureFeaturesApiVersion); + _machineLearningFeatureFeaturesRestClient = new FeaturesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureFeaturesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningFeatureSetVersionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningFeatureSetVersionResource.ResourceType), nameof(id)); + } + + /// + /// Get feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, featureName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, featureName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Features. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features + /// + /// + /// Operation Id + /// Features_List + /// + /// + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// feature name. + /// Description of the featureset. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, string tags = null, string featureName = null, string description = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, tags, featureName, description); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, tags, featureName, description); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureResource(Client, MachineLearningFeatureData.DeserializeMachineLearningFeatureData(e)), _machineLearningFeatureFeaturesClientDiagnostics, Pipeline, "MachineLearningFeatureCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Features. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features + /// + /// + /// Operation Id + /// Features_List + /// + /// + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// feature name. + /// Description of the featureset. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, string tags = null, string featureName = null, string description = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, tags, featureName, description); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, tags, featureName, description); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureResource(Client, MachineLearningFeatureData.DeserializeMachineLearningFeatureData(e)), _machineLearningFeatureFeaturesClientDiagnostics, Pipeline, "MachineLearningFeatureCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, featureName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningFeatureFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, featureName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, featureName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningFeatureFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, featureName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureData.cs new file mode 100644 index 0000000000000..245d0b74e546e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureData.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningFeature data model. + /// Azure Resource Manager resource envelope. + /// + public partial class MachineLearningFeatureData : ResourceData + { + /// Initializes a new instance of MachineLearningFeatureData. + /// [Required] Additional attributes of the entity. + /// is null. + public MachineLearningFeatureData(MachineLearningFeatureProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningFeatureData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + internal MachineLearningFeatureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningFeatureProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// [Required] Additional attributes of the entity. + public MachineLearningFeatureProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs new file mode 100644 index 0000000000000..fd6ba6a0fdb00 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningFeature along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningFeatureResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningFeature method. + /// + public partial class MachineLearningFeatureResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string featureName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningFeatureFeaturesClientDiagnostics; + private readonly FeaturesRestOperations _machineLearningFeatureFeaturesRestClient; + private readonly MachineLearningFeatureData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningFeatureResource(ArmClient client, MachineLearningFeatureData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningFeatureResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureFeaturesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningFeatureFeaturesApiVersion); + _machineLearningFeatureFeaturesRestClient = new FeaturesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureFeaturesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/featuresets/versions/features"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningFeatureData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureFeaturesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureFeaturesClientDiagnostics.CreateScope("MachineLearningFeatureResource.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureFeaturesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs new file mode 100644 index 0000000000000..fa7158a74d044 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningFeatureSetContainers method from an instance of . + /// + public partial class MachineLearningFeatureSetContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics; + private readonly FeaturesetContainersRestOperations _machineLearningFeatureSetContainerFeaturesetContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureSetContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningFeatureSetContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningFeatureSetContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningFeatureSetContainerResource.ResourceType, out string machineLearningFeatureSetContainerFeaturesetContainersApiVersion); + _machineLearningFeatureSetContainerFeaturesetContainersRestClient = new FeaturesetContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureSetContainerFeaturesetContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningWorkspaceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, MachineLearningFeatureSetContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetContainerOperationSource(Client), _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, MachineLearningFeatureSetContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetContainerOperationSource(Client), _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List featurestore entity containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets + /// + /// + /// Operation Id + /// FeaturesetContainers_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(MachineLearningFeatureSetContainerCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeatureSetContainerCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureSetContainerResource(Client, MachineLearningFeatureSetContainerData.DeserializeMachineLearningFeatureSetContainerData(e)), _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, "MachineLearningFeatureSetContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List featurestore entity containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets + /// + /// + /// Operation Id + /// FeaturesetContainers_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(MachineLearningFeatureSetContainerCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeatureSetContainerCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureSetContainerResource(Client, MachineLearningFeatureSetContainerData.DeserializeMachineLearningFeatureSetContainerData(e)), _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, "MachineLearningFeatureSetContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(options: null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerData.cs new file mode 100644 index 0000000000000..7052acbecbae1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerData.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningFeatureSetContainer data model. + /// Azure Resource Manager resource envelope. + /// + public partial class MachineLearningFeatureSetContainerData : ResourceData + { + /// Initializes a new instance of MachineLearningFeatureSetContainerData. + /// [Required] Additional attributes of the entity. + /// is null. + public MachineLearningFeatureSetContainerData(MachineLearningFeatureSetContainerProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningFeatureSetContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + internal MachineLearningFeatureSetContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningFeatureSetContainerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// [Required] Additional attributes of the entity. + public MachineLearningFeatureSetContainerProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs new file mode 100644 index 0000000000000..9139d5d81af28 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningFeatureSetContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningFeatureSetContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningFeatureSetContainer method. + /// + public partial class MachineLearningFeatureSetContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics; + private readonly FeaturesetContainersRestOperations _machineLearningFeatureSetContainerFeaturesetContainersRestClient; + private readonly MachineLearningFeatureSetContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureSetContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningFeatureSetContainerResource(ArmClient client, MachineLearningFeatureSetContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningFeatureSetContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningFeatureSetContainerFeaturesetContainersApiVersion); + _machineLearningFeatureSetContainerFeaturesetContainersRestClient = new FeaturesetContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureSetContainerFeaturesetContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/featuresets"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningFeatureSetContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningFeatureSetVersionResources in the MachineLearningFeatureSetContainer. + /// An object representing collection of MachineLearningFeatureSetVersionResources and their operations over a MachineLearningFeatureSetVersionResource. + public virtual MachineLearningFeatureSetVersionCollection GetMachineLearningFeatureSetVersions() + { + return GetCachedClient(Client => new MachineLearningFeatureSetVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningFeatureSetVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningFeatureSetVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningFeatureSetVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningFeatureSetVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_GetEntity + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetContainerFeaturesetContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetContainerFeaturesetContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetContainerFeaturesetContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningFeatureSetContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetContainerOperationSource(Client), _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} + /// + /// + /// Operation Id + /// FeaturesetContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningFeatureSetContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics.CreateScope("MachineLearningFeatureSetContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetContainerOperationSource(Client), _machineLearningFeatureSetContainerFeaturesetContainersClientDiagnostics, Pipeline, _machineLearningFeatureSetContainerFeaturesetContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs new file mode 100644 index 0000000000000..92f946df23b0c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningFeatureSetVersions method from an instance of . + /// + public partial class MachineLearningFeatureSetVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics; + private readonly FeaturesetVersionsRestOperations _machineLearningFeatureSetVersionFeaturesetVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureSetVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningFeatureSetVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningFeatureSetVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningFeatureSetVersionResource.ResourceType, out string machineLearningFeatureSetVersionFeaturesetVersionsApiVersion); + _machineLearningFeatureSetVersionFeaturesetVersionsRestClient = new FeaturesetVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureSetVersionFeaturesetVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningFeatureSetContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningFeatureSetContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, MachineLearningFeatureSetVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetVersionOperationSource(Client), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, MachineLearningFeatureSetVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetVersionOperationSource(Client), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions + /// + /// + /// Operation Id + /// FeaturesetVersions_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(MachineLearningFeatureSetVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeatureSetVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureSetVersionResource(Client, MachineLearningFeatureSetVersionData.DeserializeMachineLearningFeatureSetVersionData(e)), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, "MachineLearningFeatureSetVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions + /// + /// + /// Operation Id + /// FeaturesetVersions_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(MachineLearningFeatureSetVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeatureSetVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureSetVersionResource(Client, MachineLearningFeatureSetVersionData.DeserializeMachineLearningFeatureSetVersionData(e)), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, "MachineLearningFeatureSetVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(options: null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionData.cs new file mode 100644 index 0000000000000..e1f13c9e18de4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionData.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningFeatureSetVersion data model. + /// Azure Resource Manager resource envelope. + /// + public partial class MachineLearningFeatureSetVersionData : ResourceData + { + /// Initializes a new instance of MachineLearningFeatureSetVersionData. + /// [Required] Additional attributes of the entity. + /// is null. + public MachineLearningFeatureSetVersionData(MachineLearningFeatureSetVersionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningFeatureSetVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + internal MachineLearningFeatureSetVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningFeatureSetVersionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// [Required] Additional attributes of the entity. + public MachineLearningFeatureSetVersionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs new file mode 100644 index 0000000000000..cb1865ffa9e0b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs @@ -0,0 +1,480 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningFeatureSetVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningFeatureSetVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningFeatureSetVersion method. + /// + public partial class MachineLearningFeatureSetVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics; + private readonly FeaturesetVersionsRestOperations _machineLearningFeatureSetVersionFeaturesetVersionsRestClient; + private readonly MachineLearningFeatureSetVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureSetVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningFeatureSetVersionResource(ArmClient client, MachineLearningFeatureSetVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningFeatureSetVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningFeatureSetVersionFeaturesetVersionsApiVersion); + _machineLearningFeatureSetVersionFeaturesetVersionsRestClient = new FeaturesetVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureSetVersionFeaturesetVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/featuresets/versions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningFeatureSetVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningFeatureResources in the MachineLearningFeatureSetVersion. + /// An object representing collection of MachineLearningFeatureResources and their operations over a MachineLearningFeatureResource. + public virtual MachineLearningFeatureCollection GetMachineLearningFeatures() + { + return GetCachedClient(Client => new MachineLearningFeatureCollection(Client, Id)); + } + + /// + /// Get feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningFeatureAsync(string featureName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningFeatures().GetAsync(featureName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get feature. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName} + /// + /// + /// Operation Id + /// Features_Get + /// + /// + /// + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningFeature(string featureName, CancellationToken cancellationToken = default) + { + return GetMachineLearningFeatures().Get(featureName, cancellationToken); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureSetVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningFeatureSetVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetVersionOperationSource(Client), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturesetVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningFeatureSetVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetVersionOperationSource(Client), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Backfill. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill + /// + /// + /// Operation Id + /// FeaturesetVersions_Backfill + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Feature set version backfill request entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> BackfillAsync(WaitUntil waitUntil, FeatureSetVersionBackfillContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Backfill"); + scope.Start(); + try + { + var response = await _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.BackfillAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetJobOperationSource(), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateBackfillRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Backfill. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill + /// + /// + /// Operation Id + /// FeaturesetVersions_Backfill + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Feature set version backfill request entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Backfill(WaitUntil waitUntil, FeatureSetVersionBackfillContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics.CreateScope("MachineLearningFeatureSetVersionResource.Backfill"); + scope.Start(); + try + { + var response = _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.Backfill(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureSetJobOperationSource(), _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateBackfillRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List materialization Jobs. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/listMaterializationJobs + /// + /// + /// Operation Id + /// FeaturesetVersions_ListMaterializationJobs + /// + /// + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Start time of the feature window to filter materialization jobs. + /// End time of the feature window to filter materialization jobs. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMaterializationJobsAsync(string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListMaterializationJobsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, filters, featureWindowStart, featureWindowEnd); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListMaterializationJobsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, filters, featureWindowStart, featureWindowEnd); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, MachineLearningFeatureSetJob.DeserializeMachineLearningFeatureSetJob, _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, "MachineLearningFeatureSetVersionResource.GetMaterializationJobs", "value", "nextLink", cancellationToken); + } + + /// + /// List materialization Jobs. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/listMaterializationJobs + /// + /// + /// Operation Id + /// FeaturesetVersions_ListMaterializationJobs + /// + /// + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Start time of the feature window to filter materialization jobs. + /// End time of the feature window to filter materialization jobs. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMaterializationJobs(string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListMaterializationJobsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, filters, featureWindowStart, featureWindowEnd); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureSetVersionFeaturesetVersionsRestClient.CreateListMaterializationJobsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, skip, filters, featureWindowStart, featureWindowEnd); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, MachineLearningFeatureSetJob.DeserializeMachineLearningFeatureSetJob, _machineLearningFeatureSetVersionFeaturesetVersionsClientDiagnostics, Pipeline, "MachineLearningFeatureSetVersionResource.GetMaterializationJobs", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs new file mode 100644 index 0000000000000..3e0b1e8d2c18e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningFeatureStoreEntityContainers method from an instance of . + /// + public partial class MachineLearningFeatureStoreEntityContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics; + private readonly FeaturestoreEntityContainersRestOperations _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureStoreEntityContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningFeatureStoreEntityContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningFeatureStoreEntityContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningFeatureStoreEntityContainerResource.ResourceType, out string machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersApiVersion); + _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient = new FeaturestoreEntityContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningWorkspaceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, MachineLearningFeatureStoreEntityContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureStoreEntityContainerOperationSource(Client), _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, MachineLearningFeatureStoreEntityContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureStoreEntityContainerOperationSource(Client), _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureStoreEntityContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureStoreEntityContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List featurestore entity containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureStoreEntityContainerResource(Client, MachineLearningFeatureStoreEntityContainerData.DeserializeMachineLearningFeatureStoreEntityContainerData(e)), _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, "MachineLearningFeatureStoreEntityContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List featurestore entity containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.Name, options.Description, options.CreatedBy); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeatureStoreEntityContainerResource(Client, MachineLearningFeatureStoreEntityContainerData.DeserializeMachineLearningFeatureStoreEntityContainerData(e)), _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, "MachineLearningFeatureStoreEntityContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureStoreEntityContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureStoreEntityContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(options: null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerData.cs new file mode 100644 index 0000000000000..5de19144ab21b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerData.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningFeatureStoreEntityContainer data model. + /// Azure Resource Manager resource envelope. + /// + public partial class MachineLearningFeatureStoreEntityContainerData : ResourceData + { + /// Initializes a new instance of MachineLearningFeatureStoreEntityContainerData. + /// [Required] Additional attributes of the entity. + /// is null. + public MachineLearningFeatureStoreEntityContainerData(MachineLearningFeatureStoreEntityContainerProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningFeatureStoreEntityContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + internal MachineLearningFeatureStoreEntityContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningFeatureStoreEntityContainerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// [Required] Additional attributes of the entity. + public MachineLearningFeatureStoreEntityContainerProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs new file mode 100644 index 0000000000000..2154c19f6b43c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningFeatureStoreEntityContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningFeatureStoreEntityContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningFeatureStoreEntityContainer method. + /// + public partial class MachineLearningFeatureStoreEntityContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics; + private readonly FeaturestoreEntityContainersRestOperations _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient; + private readonly MachineLearningFeatureStoreEntityContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeatureStoreEntityContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningFeatureStoreEntityContainerResource(ArmClient client, MachineLearningFeatureStoreEntityContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningFeatureStoreEntityContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersApiVersion); + _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient = new FeaturestoreEntityContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/featurestoreEntities"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningFeatureStoreEntityContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningFeaturestoreEntityVersionResources in the MachineLearningFeatureStoreEntityContainer. + /// An object representing collection of MachineLearningFeaturestoreEntityVersionResources and their operations over a MachineLearningFeaturestoreEntityVersionResource. + public virtual MachineLearningFeaturestoreEntityVersionCollection GetMachineLearningFeaturestoreEntityVersions() + { + return GetCachedClient(Client => new MachineLearningFeaturestoreEntityVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningFeaturestoreEntityVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningFeaturestoreEntityVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningFeaturestoreEntityVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningFeaturestoreEntityVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureStoreEntityContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_GetEntity + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.GetEntity(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeatureStoreEntityContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningFeatureStoreEntityContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureStoreEntityContainerOperationSource(Client), _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} + /// + /// + /// Operation Id + /// FeaturestoreEntityContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningFeatureStoreEntityContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics.CreateScope("MachineLearningFeatureStoreEntityContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeatureStoreEntityContainerOperationSource(Client), _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersClientDiagnostics, Pipeline, _machineLearningFeatureStoreEntityContainerFeaturestoreEntityContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs new file mode 100644 index 0000000000000..82f60960c8b91 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningFeaturestoreEntityVersions method from an instance of . + /// + public partial class MachineLearningFeaturestoreEntityVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics; + private readonly FeaturestoreEntityVersionsRestOperations _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeaturestoreEntityVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningFeaturestoreEntityVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningFeaturestoreEntityVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningFeaturestoreEntityVersionResource.ResourceType, out string machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsApiVersion); + _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient = new FeaturestoreEntityVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningFeatureStoreEntityContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningFeatureStoreEntityContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, MachineLearningFeaturestoreEntityVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeaturestoreEntityVersionOperationSource(Client), _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, MachineLearningFeaturestoreEntityVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeaturestoreEntityVersionOperationSource(Client), _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeaturestoreEntityVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeaturestoreEntityVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeaturestoreEntityVersionResource(Client, MachineLearningFeaturestoreEntityVersionData.DeserializeMachineLearningFeaturestoreEntityVersionData(e)), _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, "MachineLearningFeaturestoreEntityVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.Tags, options.ListViewType, pageSizeHint, options.VersionName, options.Version, options.Description, options.CreatedBy, options.Stage); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningFeaturestoreEntityVersionResource(Client, MachineLearningFeaturestoreEntityVersionData.DeserializeMachineLearningFeaturestoreEntityVersionData(e)), _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, "MachineLearningFeaturestoreEntityVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeaturestoreEntityVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeaturestoreEntityVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(options: null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionData.cs new file mode 100644 index 0000000000000..ec54840c542f9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionData.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningFeaturestoreEntityVersion data model. + /// Azure Resource Manager resource envelope. + /// + public partial class MachineLearningFeaturestoreEntityVersionData : ResourceData + { + /// Initializes a new instance of MachineLearningFeaturestoreEntityVersionData. + /// [Required] Additional attributes of the entity. + /// is null. + public MachineLearningFeaturestoreEntityVersionData(MachineLearningFeatureStoreEntityVersionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningFeaturestoreEntityVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + internal MachineLearningFeaturestoreEntityVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningFeatureStoreEntityVersionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// [Required] Additional attributes of the entity. + public MachineLearningFeatureStoreEntityVersionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs new file mode 100644 index 0000000000000..059836b76ed61 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningFeaturestoreEntityVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningFeaturestoreEntityVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningFeaturestoreEntityVersion method. + /// + public partial class MachineLearningFeaturestoreEntityVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics; + private readonly FeaturestoreEntityVersionsRestOperations _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient; + private readonly MachineLearningFeaturestoreEntityVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningFeaturestoreEntityVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningFeaturestoreEntityVersionResource(ArmClient client, MachineLearningFeaturestoreEntityVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningFeaturestoreEntityVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsApiVersion); + _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient = new FeaturestoreEntityVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/featurestoreEntities/versions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningFeaturestoreEntityVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeaturestoreEntityVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningFeaturestoreEntityVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningFeaturestoreEntityVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningFeaturestoreEntityVersionOperationSource(Client), _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version} + /// + /// + /// Operation Id + /// FeaturestoreEntityVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningFeaturestoreEntityVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics.CreateScope("MachineLearningFeaturestoreEntityVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningFeaturestoreEntityVersionOperationSource(Client), _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsClientDiagnostics, Pipeline, _machineLearningFeaturestoreEntityVersionFeaturestoreEntityVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs index 1b5d2cb9e26cf..54a4ec96b595d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs @@ -223,16 +223,15 @@ public virtual Response Get(string id, CancellationT /// /// /// - /// Continuation token for pagination. - /// Type of job to be returned. - /// Jobs returned will have this tag key. - /// View type for including/excluding (for example) archived entities. + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(MachineLearningJobCollectionGetAllOptions options, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningJobJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, jobType, tag, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningJobJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, jobType, tag, listViewType); + options ??= new MachineLearningJobCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningJobJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.JobType, options.Tag, options.ListViewType, options.AssetName, options.Scheduled, options.ScheduleId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningJobJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.JobType, options.Tag, options.ListViewType, options.AssetName, options.Scheduled, options.ScheduleId); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningJobResource(Client, MachineLearningJobData.DeserializeMachineLearningJobData(e)), _machineLearningJobJobsClientDiagnostics, Pipeline, "MachineLearningJobCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -249,16 +248,15 @@ public virtual AsyncPageable GetAllAsync(string skip /// /// /// - /// Continuation token for pagination. - /// Type of job to be returned. - /// Jobs returned will have this tag key. - /// View type for including/excluding (for example) archived entities. + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(MachineLearningJobCollectionGetAllOptions options, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningJobJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, jobType, tag, listViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningJobJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, jobType, tag, listViewType); + options ??= new MachineLearningJobCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningJobJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.JobType, options.Tag, options.ListViewType, options.AssetName, options.Scheduled, options.ScheduleId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningJobJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options.Skip, options.JobType, options.Tag, options.ListViewType, options.AssetName, options.Scheduled, options.ScheduleId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningJobResource(Client, MachineLearningJobData.DeserializeMachineLearningJobData(e)), _machineLearningJobJobsClientDiagnostics, Pipeline, "MachineLearningJobCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -408,17 +406,17 @@ public virtual NullableResponse GetIfExists(string i IEnumerator IEnumerable.GetEnumerator() { - return GetAll().GetEnumerator(); + return GetAll(options: null).GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { - return GetAll().GetEnumerator(); + return GetAll(options: null).GetEnumerator(); } IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + return GetAllAsync(options: null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs index 46efa6d28bb06..7f688a51cedf5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs @@ -22,7 +22,7 @@ public partial class MachineLearningJobData : ResourceData /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// /// is null. public MachineLearningJobData(MachineLearningJobProperties properties) @@ -40,7 +40,7 @@ public MachineLearningJobData(MachineLearningJobProperties properties) /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// internal MachineLearningJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningJobProperties properties) : base(id, name, resourceType, systemData) { @@ -50,7 +50,7 @@ internal MachineLearningJobData(ResourceIdentifier id, string name, ResourceType /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// public MachineLearningJobProperties Properties { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs index ac190817ca318..2c47c8bcf674e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs @@ -13,6 +13,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; namespace Azure.ResourceManager.MachineLearning { @@ -219,7 +220,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Creates and executes a Job. + /// Updates a Job. /// /// /// Request Path @@ -227,27 +228,23 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// Jobs_CreateOrUpdate + /// Jobs_Update /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Job definition object. + /// Job definition to apply during the operation. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningJobData data, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(MachineLearningJobPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _machineLearningJobJobsClientDiagnostics.CreateScope("MachineLearningJobResource.Update"); scope.Start(); try { - var response = await _machineLearningJobJobsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningJobResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _machineLearningJobJobsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningJobResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -257,7 +254,7 @@ public virtual async Task> UpdateAsync( } /// - /// Creates and executes a Job. + /// Updates a Job. /// /// /// Request Path @@ -265,27 +262,23 @@ public virtual async Task> UpdateAsync( /// /// /// Operation Id - /// Jobs_CreateOrUpdate + /// Jobs_Update /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Job definition object. + /// Job definition to apply during the operation. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningJobData data, CancellationToken cancellationToken = default) + /// is null. + public virtual Response Update(MachineLearningJobPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _machineLearningJobJobsClientDiagnostics.CreateScope("MachineLearningJobResource.Update"); scope.Start(); try { - var response = _machineLearningJobJobsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningJobResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _machineLearningJobJobsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new MachineLearningJobResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobCollection.cs new file mode 100644 index 0000000000000..2ab1fe9de69c2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobCollection.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningLabelingJobs method from an instance of . + /// + public partial class MachineLearningLabelingJobCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningLabelingJobLabelingJobsClientDiagnostics; + private readonly LabelingJobsRestOperations _machineLearningLabelingJobLabelingJobsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningLabelingJobCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningLabelingJobCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningLabelingJobLabelingJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningLabelingJobResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningLabelingJobResource.ResourceType, out string machineLearningLabelingJobLabelingJobsApiVersion); + _machineLearningLabelingJobLabelingJobsRestClient = new LabelingJobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningLabelingJobLabelingJobsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningWorkspaceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name and identifier for the LabelingJob. + /// LabelingJob definition object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string id, MachineLearningLabelingJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningLabelingJobOperationSource(Client), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name and identifier for the LabelingJob. + /// LabelingJob definition object. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string id, MachineLearningLabelingJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningLabelingJobOperationSource(Client), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a labeling job by name/id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, includeJobInstructions, includeLabelCategories, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningLabelingJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a labeling job by name/id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, includeJobInstructions, includeLabelCategories, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningLabelingJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists labeling jobs in the workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs + /// + /// + /// Operation Id + /// LabelingJobs_List + /// + /// + /// + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningLabelingJobLabelingJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningLabelingJobLabelingJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningLabelingJobResource(Client, MachineLearningLabelingJobData.DeserializeMachineLearningLabelingJobData(e)), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, "MachineLearningLabelingJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists labeling jobs in the workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs + /// + /// + /// Operation Id + /// LabelingJobs_List + /// + /// + /// + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningLabelingJobLabelingJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningLabelingJobLabelingJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningLabelingJobResource(Client, MachineLearningLabelingJobData.DeserializeMachineLearningLabelingJobData(e)), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, "MachineLearningLabelingJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, includeJobInstructions, includeLabelCategories, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, includeJobInstructions, includeLabelCategories, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, includeJobInstructions, includeLabelCategories, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningLabelingJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, includeJobInstructions, includeLabelCategories, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningLabelingJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobData.cs new file mode 100644 index 0000000000000..7d699b56f0911 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobData.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningLabelingJob data model. + /// Azure Resource Manager resource envelope. + /// + public partial class MachineLearningLabelingJobData : ResourceData + { + /// Initializes a new instance of MachineLearningLabelingJobData. + /// [Required] Additional attributes of the entity. + /// is null. + public MachineLearningLabelingJobData(LabelingJobProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningLabelingJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + internal MachineLearningLabelingJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, LabelingJobProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// [Required] Additional attributes of the entity. + public LabelingJobProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobResource.cs new file mode 100644 index 0000000000000..3523fd491aa31 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningLabelingJobResource.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningLabelingJob along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningLabelingJobResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningLabelingJob method. + /// + public partial class MachineLearningLabelingJobResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string id) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningLabelingJobLabelingJobsClientDiagnostics; + private readonly LabelingJobsRestOperations _machineLearningLabelingJobLabelingJobsRestClient; + private readonly MachineLearningLabelingJobData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningLabelingJobResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningLabelingJobResource(ArmClient client, MachineLearningLabelingJobData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningLabelingJobResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningLabelingJobLabelingJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningLabelingJobLabelingJobsApiVersion); + _machineLearningLabelingJobLabelingJobsRestClient = new LabelingJobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningLabelingJobLabelingJobsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/labelingJobs"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningLabelingJobData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a labeling job by name/id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + public virtual async Task> GetAsync(bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, includeJobInstructions, includeLabelCategories, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningLabelingJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a labeling job by name/id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + public virtual Response Get(bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Get"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, includeJobInstructions, includeLabelCategories, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningLabelingJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a labeling job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a labeling job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// LabelingJob definition object. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningLabelingJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningLabelingJobOperationSource(Client), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// LabelingJob definition object. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningLabelingJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Update"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningLabelingJobOperationSource(Client), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Export labels from a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels + /// + /// + /// Operation Id + /// LabelingJobs_ExportLabels + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The export summary. + /// The cancellation token to use. + /// is null. + public virtual async Task> ExportLabelsAsync(WaitUntil waitUntil, ExportSummary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.ExportLabels"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.ExportLabelsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new ExportSummaryOperationSource(), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateExportLabelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Export labels from a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels + /// + /// + /// Operation Id + /// LabelingJobs_ExportLabels + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The export summary. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ExportLabels(WaitUntil waitUntil, ExportSummary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.ExportLabels"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.ExportLabels(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new MachineLearningArmOperation(new ExportSummaryOperationSource(), _machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateExportLabelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Pause a labeling job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause + /// + /// + /// Operation Id + /// LabelingJobs_Pause + /// + /// + /// + /// The cancellation token to use. + public virtual async Task PauseAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Pause"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.PauseAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Pause a labeling job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause + /// + /// + /// Operation Id + /// LabelingJobs_Pause + /// + /// + /// + /// The cancellation token to use. + public virtual Response Pause(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Pause"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.Pause(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resume a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/resume + /// + /// + /// Operation Id + /// LabelingJobs_Resume + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task ResumeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Resume"); + scope.Start(); + try + { + var response = await _machineLearningLabelingJobLabelingJobsRestClient.ResumeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resume a labeling job (asynchronous). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/resume + /// + /// + /// Operation Id + /// LabelingJobs_Resume + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Resume(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningLabelingJobLabelingJobsClientDiagnostics.CreateScope("MachineLearningLabelingJobResource.Resume"); + scope.Start(); + try + { + var response = _machineLearningLabelingJobLabelingJobsRestClient.Resume(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningLabelingJobLabelingJobsClientDiagnostics, Pipeline, _machineLearningLabelingJobLabelingJobsRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs index 89cd8a5ebb9a9..8f7e63380c595 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs @@ -230,8 +230,8 @@ public virtual AsyncPageable GetAllAsync(Ma { options ??= new MachineLearningModelVersionCollectionGetAllOptions(); - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningModelVersionModelVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningModelVersionModelVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningModelVersionModelVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningModelVersionModelVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType, options.Stage); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningModelVersionResource(Client, MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(e)), _machineLearningModelVersionModelVersionsClientDiagnostics, Pipeline, "MachineLearningModelVersionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -255,8 +255,8 @@ public virtual Pageable GetAll(MachineLearn { options ??= new MachineLearningModelVersionCollectionGetAllOptions(); - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningModelVersionModelVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningModelVersionModelVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningModelVersionModelVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType, options.Stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningModelVersionModelVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Offset, options.Tags, options.Properties, options.Feed, options.ListViewType, options.Stage); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningModelVersionResource(Client, MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(e)), _machineLearningModelVersionModelVersionsClientDiagnostics, Pipeline, "MachineLearningModelVersionCollection.GetAll", "value", "nextLink", cancellationToken); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs index a9a347d2fa965..ea8ad9ecda332 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs @@ -13,6 +13,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; namespace Azure.ResourceManager.MachineLearning { @@ -293,5 +294,81 @@ public virtual ArmOperation Update(WaitUnti throw; } } + + /// + /// Model Version Package operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package + /// + /// + /// Operation Id + /// ModelVersions_Package + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Package operation request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> PackageAsync(WaitUntil waitUntil, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Package"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.PackageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new ModelPackageResultOperationSource(), _machineLearningModelVersionModelVersionsClientDiagnostics, Pipeline, _machineLearningModelVersionModelVersionsRestClient.CreatePackageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Model Version Package operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package + /// + /// + /// Operation Id + /// ModelVersions_Package + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Package operation request body. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Package(WaitUntil waitUntil, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Package"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.Package(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new MachineLearningArmOperation(new ModelPackageResultOperationSource(), _machineLearningModelVersionModelVersionsClientDiagnostics, Pipeline, _machineLearningModelVersionModelVersionsRestClient.CreatePackageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs index 6ac0c79f06ee0..aef8c36c86783 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs @@ -82,7 +82,7 @@ public virtual async Task> try { var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -123,7 +123,7 @@ public virtual ArmOperation CreateOrUpd try { var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs index 7954248796b33..d75b4d6bd08b3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs @@ -83,7 +83,7 @@ public virtual async Task> C try { var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -124,7 +124,7 @@ public virtual ArmOperation CreateOrUpdat try { var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs index 6fcd4b6fb4573..175fc1d9e8354 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs @@ -486,7 +486,7 @@ public virtual ArmOperation RegenerateKeys(WaitUntil waitUntil, MachineLearningE } /// - /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + /// Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. /// /// /// Request Path @@ -516,7 +516,7 @@ public virtual async Task> GetTokenAs } /// - /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + /// Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. /// /// /// Request Path diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs new file mode 100644 index 0000000000000..9c76053dcc94c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningOutboundRuleBasics method from an instance of . + /// + public partial class MachineLearningOutboundRuleBasicCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics; + private readonly ManagedNetworkSettingsRuleRestOperations _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningOutboundRuleBasicCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningOutboundRuleBasicCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningOutboundRuleBasicResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningOutboundRuleBasicResource.ResourceType, out string machineLearningOutboundRuleBasicManagedNetworkSettingsRuleApiVersion); + _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient = new ManagedNetworkSettingsRuleRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningOutboundRuleBasicManagedNetworkSettingsRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningWorkspaceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates an outbound rule in the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the workspace managed network outbound rule. + /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ruleName, MachineLearningOutboundRuleBasicData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningOutboundRuleBasicOperationSource(Client), _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an outbound rule in the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the workspace managed network outbound rule. + /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ruleName, MachineLearningOutboundRuleBasicData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningOutboundRuleBasicOperationSource(Client), _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOutboundRuleBasicResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOutboundRuleBasicResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the managed network outbound rules for a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningOutboundRuleBasicResource(Client, MachineLearningOutboundRuleBasicData.DeserializeMachineLearningOutboundRuleBasicData(e)), _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, "MachineLearningOutboundRuleBasicCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the managed network outbound rules for a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningOutboundRuleBasicResource(Client, MachineLearningOutboundRuleBasicData.DeserializeMachineLearningOutboundRuleBasicData(e)), _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, "MachineLearningOutboundRuleBasicCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOutboundRuleBasicResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOutboundRuleBasicResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs new file mode 100644 index 0000000000000..ab8d8e14091e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningOutboundRuleBasic data model. + /// Outbound Rule Basic Resource for the managed network of a machine learning workspace. + /// + public partial class MachineLearningOutboundRuleBasicData : ResourceData + { + /// Initializes a new instance of MachineLearningOutboundRuleBasicData. + /// + /// Outbound Rule for the managed network of a machine learning workspace. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + public MachineLearningOutboundRuleBasicData(MachineLearningOutboundRule properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningOutboundRuleBasicData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Outbound Rule for the managed network of a machine learning workspace. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal MachineLearningOutboundRuleBasicData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningOutboundRule properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// Outbound Rule for the managed network of a machine learning workspace. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MachineLearningOutboundRule Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs new file mode 100644 index 0000000000000..fa2ebf1c47295 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningOutboundRuleBasic along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningOutboundRuleBasicResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningOutboundRuleBasic method. + /// + public partial class MachineLearningOutboundRuleBasicResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics; + private readonly ManagedNetworkSettingsRuleRestOperations _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient; + private readonly MachineLearningOutboundRuleBasicData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningOutboundRuleBasicResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningOutboundRuleBasicResource(ArmClient client, MachineLearningOutboundRuleBasicData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningOutboundRuleBasicResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningOutboundRuleBasicManagedNetworkSettingsRuleApiVersion); + _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient = new ManagedNetworkSettingsRuleRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningOutboundRuleBasicManagedNetworkSettingsRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/outboundRules"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningOutboundRuleBasicData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOutboundRuleBasicResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicResource.Get"); + scope.Start(); + try + { + var response = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOutboundRuleBasicResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an outbound rule in the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningOutboundRuleBasicData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningOutboundRuleBasicOperationSource(Client), _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an outbound rule in the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningOutboundRuleBasicData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics.CreateScope("MachineLearningOutboundRuleBasicResource.Update"); + scope.Start(); + try + { + var response = _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningOutboundRuleBasicOperationSource(Client), _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleClientDiagnostics, Pipeline, _machineLearningOutboundRuleBasicManagedNetworkSettingsRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs index 740303572373e..8774c2444aee9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs @@ -54,7 +54,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Update the state of 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. /// /// /// Request Path @@ -67,8 +68,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection associated with the workspace. - /// The private endpoint connection properties. + /// NRP Private Endpoint Connection Name. + /// PrivateEndpointConnection object. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -95,7 +96,8 @@ public virtual async Task - /// Update the state of 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. /// /// /// Request Path @@ -108,8 +110,8 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection associated with the workspace. - /// The private endpoint connection properties. + /// NRP Private Endpoint Connection Name. + /// PrivateEndpointConnection object. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,7 +138,7 @@ public virtual ArmOperation Cr } /// - /// Gets the specified private endpoint connection associated with the workspace. + /// Called by end-users to get a PE connection. /// /// /// Request Path @@ -148,7 +150,7 @@ public virtual ArmOperation Cr /// /// /// - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -173,7 +175,7 @@ public virtual async Task - /// Gets the specified private endpoint connection associated with the workspace. + /// Called by end-users to get a PE connection. /// /// /// Request Path @@ -185,7 +187,7 @@ public virtual async Task /// /// - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -210,7 +212,7 @@ public virtual Response Get(st } /// - /// List all the private endpoint connections associated with the workspace. + /// Called by end-users to get all PE connections. /// /// /// Request Path @@ -231,7 +233,7 @@ public virtual AsyncPageable G } /// - /// List all the private endpoint connections associated with the workspace. + /// Called by end-users to get all PE connections. /// /// /// Request Path @@ -264,7 +266,7 @@ public virtual Pageable GetAll /// /// /// - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -299,7 +301,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -334,7 +336,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -371,7 +373,7 @@ public virtual async Task /// /// - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs index 3d301426cb389..5ee82bfaf2ad3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs @@ -31,11 +31,11 @@ public MachineLearningPrivateEndpointConnectionData(AzureLocation location) : ba /// The systemData. /// The tags. /// The location. - /// The identity of the resource. - /// The sku of the workspace. - /// The resource of private end point. - /// A collection of information about the state of the connection between service consumer and provider. - /// The provisioning state of the private endpoint connection resource. + /// Managed service identity (system assigned and/or user assigned identities). + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The Private Endpoint resource. + /// The connection state. + /// The current provisioning state. internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, MachineLearningPrivateEndpoint privateEndpoint, MachineLearningPrivateLinkServiceConnectionState connectionState, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; @@ -45,15 +45,15 @@ internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, str ProvisioningState = provisioningState; } - /// The identity of the resource. + /// Managed service identity (system assigned and/or user assigned identities). public ManagedServiceIdentity Identity { get; set; } - /// The sku of the workspace. + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. public MachineLearningSku Sku { get; set; } - /// The resource of private end point. + /// The Private Endpoint resource. public MachineLearningPrivateEndpoint PrivateEndpoint { get; set; } - /// A collection of information about the state of the connection between service consumer and provider. + /// The connection state. public MachineLearningPrivateLinkServiceConnectionState ConnectionState { get; set; } - /// The provisioning state of the private endpoint connection resource. + /// The current provisioning state. public MachineLearningPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs index 1a41d366f98f0..1cc0de9fd54a9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs @@ -88,7 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets the specified private endpoint connection associated with the workspace. + /// Called by end-users to get a PE connection. /// /// /// Request Path @@ -120,7 +120,7 @@ public virtual async Task - /// Gets the specified private endpoint connection associated with the workspace. + /// Called by end-users to get a PE connection. /// /// /// Request Path @@ -152,7 +152,7 @@ public virtual Response Get(Ca } /// - /// Deletes the specified private endpoint connection associated with the workspace. + /// Called by end-users to delete a PE connection. /// /// /// Request Path @@ -186,7 +186,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes the specified private endpoint connection associated with the workspace. + /// Called by end-users to delete a PE connection. /// /// /// Request Path @@ -220,7 +220,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Update the state of 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. /// /// /// Request Path @@ -233,7 +234,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection properties. + /// PrivateEndpointConnection object. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) @@ -258,7 +259,8 @@ public virtual async Task - /// Update the state of 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. /// /// /// Request Path @@ -271,7 +273,7 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection properties. + /// PrivateEndpointConnection object. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs new file mode 100644 index 0000000000000..3f6f4e4956554 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryCodeContainers method from an instance of . + /// + public partial class MachineLearningRegistryCodeContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics; + private readonly RegistryCodeContainersRestOperations _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryCodeContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryCodeContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryCodeContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryCodeContainerResource.ResourceType, out string machineLearningRegistryCodeContainerRegistryCodeContainersApiVersion); + _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient = new RegistryCodeContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryCodeContainerRegistryCodeContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryResource.ResourceType), nameof(id)); + } + + /// + /// Create or update Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string codeName, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeContainerOperationSource(Client), _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string codeName, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeContainerOperationSource(Client), _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes + /// + /// + /// Operation Id + /// RegistryCodeContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryCodeContainerResource(Client, MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(e)), _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, "MachineLearningRegistryCodeContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes + /// + /// + /// Operation Id + /// RegistryCodeContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryCodeContainerResource(Client, MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(e)), _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, "MachineLearningRegistryCodeContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, codeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs new file mode 100644 index 0000000000000..df389f08a833a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryCodeContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryCodeContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryCodeContainer method. + /// + public partial class MachineLearningRegistryCodeContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string codeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics; + private readonly RegistryCodeContainersRestOperations _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient; + private readonly MachineLearningCodeContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryCodeContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryCodeContainerResource(ArmClient client, MachineLearningCodeContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryCodeContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryCodeContainerRegistryCodeContainersApiVersion); + _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient = new RegistryCodeContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryCodeContainerRegistryCodeContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/codes"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningCodeContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningRegistryCodeVersionResources in the MachineLearningRegistryCodeContainer. + /// An object representing collection of MachineLearningRegistryCodeVersionResources and their operations over a MachineLearningRegistryCodeVersionResource. + public virtual MachineLearningRegistryCodeVersionCollection GetMachineLearningRegistryCodeVersions() + { + return GetCachedClient(Client => new MachineLearningRegistryCodeVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryCodeVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryCodeVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryCodeVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryCodeVersions().Get(version, cancellationToken); + } + + /// + /// Get Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeContainerOperationSource(Client), _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics.CreateScope("MachineLearningRegistryCodeContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeContainerOperationSource(Client), _machineLearningRegistryCodeContainerRegistryCodeContainersClientDiagnostics, Pipeline, _machineLearningRegistryCodeContainerRegistryCodeContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs new file mode 100644 index 0000000000000..2be1fcc4a15cb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryCodeVersions method from an instance of . + /// + public partial class MachineLearningRegistryCodeVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics; + private readonly RegistryCodeVersionsRestOperations _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryCodeVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryCodeVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryCodeVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryCodeVersionResource.ResourceType, out string machineLearningRegistryCodeVersionRegistryCodeVersionsApiVersion); + _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient = new RegistryCodeVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryCodeVersionRegistryCodeVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryCodeContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryCodeContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeVersionOperationSource(Client), _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeVersionOperationSource(Client), _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions + /// + /// + /// Operation Id + /// RegistryCodeVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryCodeVersionResource(Client, MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(e)), _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryCodeVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions + /// + /// + /// Operation Id + /// RegistryCodeVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryCodeVersionResource(Client, MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(e)), _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryCodeVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs new file mode 100644 index 0000000000000..a15ea6f35ae2c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryCodeVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryCodeVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryCodeVersion method. + /// + public partial class MachineLearningRegistryCodeVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics; + private readonly RegistryCodeVersionsRestOperations _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient; + private readonly MachineLearningCodeVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryCodeVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryCodeVersionResource(ArmClient client, MachineLearningCodeVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryCodeVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryCodeVersionRegistryCodeVersionsApiVersion); + _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient = new RegistryCodeVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryCodeVersionRegistryCodeVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/codes/versions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningCodeVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeVersionOperationSource(Client), _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryCodeVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryCodeVersionOperationSource(Client), _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics, Pipeline, _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate a storage location and credential for the client to upload a code asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// RegistryCodeVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrGetStartPendingUploadAsync(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = await _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateOrGetStartPendingUploadAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate a storage location and credential for the client to upload a code asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// RegistryCodeVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual Response CreateOrGetStartPendingUpload(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningRegistryCodeVersionRegistryCodeVersionsClientDiagnostics.CreateScope("MachineLearningRegistryCodeVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = _machineLearningRegistryCodeVersionRegistryCodeVersionsRestClient.CreateOrGetStartPendingUpload(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs new file mode 100644 index 0000000000000..8a011a6eed107 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistries method from an instance of . + /// + public partial class MachineLearningRegistryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryRegistriesClientDiagnostics; + private readonly RegistriesRestOperations _machineLearningRegistryRegistriesRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryRegistriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryResource.ResourceType, out string machineLearningRegistryRegistriesApiVersion); + _machineLearningRegistryRegistriesRestClient = new RegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryRegistriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create or update registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string registryName, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, registryName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryOperationSource(Client), _machineLearningRegistryRegistriesClientDiagnostics, Pipeline, _machineLearningRegistryRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, registryName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string registryName, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, registryName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryOperationSource(Client), _machineLearningRegistryRegistriesClientDiagnostics, Pipeline, _machineLearningRegistryRegistriesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, registryName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, registryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, registryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List registries + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries + /// + /// + /// Operation Id + /// Registries_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryRegistriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryRegistriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryResource(Client, MachineLearningRegistryData.DeserializeMachineLearningRegistryData(e)), _machineLearningRegistryRegistriesClientDiagnostics, Pipeline, "MachineLearningRegistryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List registries + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries + /// + /// + /// Operation Id + /// Registries_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryRegistriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryRegistriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryResource(Client, MachineLearningRegistryData.DeserializeMachineLearningRegistryData(e)), _machineLearningRegistryRegistriesClientDiagnostics, Pipeline, "MachineLearningRegistryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, registryName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, registryName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, registryName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, registryName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs new file mode 100644 index 0000000000000..54d94c1f2c8fc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningRegistry data model. + public partial class MachineLearningRegistryData : TrackedResourceData + { + /// Initializes a new instance of MachineLearningRegistryData. + /// The location. + public MachineLearningRegistryData(AzureLocation location) : base(location) + { + PrivateEndpointConnections = new ChangeTrackingList(); + RegionDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningRegistryData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity (system assigned and/or user assigned identities). + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Sku details required for ARM contract for Autoscaling. + /// Discovery URL for the Registry. + /// IntellectualPropertyPublisher for the registry. + /// ResourceId of the managed RG if the registry has system created resources. + /// MLFlow Registry URI for the Registry. + /// Private endpoint connections info used for pending connections in private link portal. + /// + /// Is the Registry accessible from the internet? + /// Possible values: "Enabled" or "Disabled" + /// + /// Details of each region the registry is in. + internal MachineLearningRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningSku sku, Uri discoveryUri, string intellectualPropertyPublisher, ArmResourceId managedResourceGroup, Uri mlFlowRegistryUri, IList privateEndpointConnections, string publicNetworkAccess, IList regionDetails) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + Kind = kind; + Sku = sku; + DiscoveryUri = discoveryUri; + IntellectualPropertyPublisher = intellectualPropertyPublisher; + ManagedResourceGroup = managedResourceGroup; + MlFlowRegistryUri = mlFlowRegistryUri; + PrivateEndpointConnections = privateEndpointConnections; + PublicNetworkAccess = publicNetworkAccess; + RegionDetails = regionDetails; + } + + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + public string Kind { get; set; } + /// Sku details required for ARM contract for Autoscaling. + public MachineLearningSku Sku { get; set; } + /// Discovery URL for the Registry. + public Uri DiscoveryUri { get; set; } + /// IntellectualPropertyPublisher for the registry. + public string IntellectualPropertyPublisher { get; set; } + /// ResourceId of the managed RG if the registry has system created resources. + internal ArmResourceId ManagedResourceGroup { get; set; } + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ManagedResourceId + { + get => ManagedResourceGroup is null ? default : ManagedResourceGroup.ResourceId; + set + { + if (ManagedResourceGroup is null) + ManagedResourceGroup = new ArmResourceId(); + ManagedResourceGroup.ResourceId = value; + } + } + + /// MLFlow Registry URI for the Registry. + public Uri MlFlowRegistryUri { get; set; } + /// Private endpoint connections info used for pending connections in private link portal. + public IList PrivateEndpointConnections { get; set; } + /// + /// Is the Registry accessible from the internet? + /// Possible values: "Enabled" or "Disabled" + /// + public string PublicNetworkAccess { get; set; } + /// Details of each region the registry is in. + public IList RegionDetails { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs new file mode 100644 index 0000000000000..6266620e1a2a4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryDataContainers method from an instance of . + /// + public partial class MachineLearningRegistryDataContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics; + private readonly RegistryDataContainersRestOperations _machineLearningRegistryDataContainerRegistryDataContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryDataContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryDataContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryDataContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryDataContainerResource.ResourceType, out string machineLearningRegistryDataContainerRegistryDataContainersApiVersion); + _machineLearningRegistryDataContainerRegistryDataContainersRestClient = new RegistryDataContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryDataContainerRegistryDataContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryResource.ResourceType), nameof(id)); + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataContainerOperationSource(Client), _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataContainerOperationSource(Client), _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataContainerRegistryDataContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataContainerRegistryDataContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Data containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data + /// + /// + /// Operation Id + /// RegistryDataContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryDataContainerResource(Client, MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(e)), _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, "MachineLearningRegistryDataContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Data containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data + /// + /// + /// Operation Id + /// RegistryDataContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryDataContainerResource(Client, MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(e)), _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, "MachineLearningRegistryDataContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataContainerRegistryDataContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataContainerRegistryDataContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataContainerRegistryDataContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataContainerRegistryDataContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs new file mode 100644 index 0000000000000..1c0de50b118e7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryDataContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryDataContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryDataContainer method. + /// + public partial class MachineLearningRegistryDataContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics; + private readonly RegistryDataContainersRestOperations _machineLearningRegistryDataContainerRegistryDataContainersRestClient; + private readonly MachineLearningDataContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryDataContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryDataContainerResource(ArmClient client, MachineLearningDataContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryDataContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryDataContainerRegistryDataContainersApiVersion); + _machineLearningRegistryDataContainerRegistryDataContainersRestClient = new RegistryDataContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryDataContainerRegistryDataContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/data"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningDataContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningRegistryDataVersionResources in the MachineLearningRegistryDataContainer. + /// An object representing collection of MachineLearningRegistryDataVersionResources and their operations over a MachineLearningRegistryDataVersionResource. + public virtual MachineLearningRegistryDataVersionCollection GetMachineLearningRegistryDataVersions() + { + return GetCachedClient(Client => new MachineLearningRegistryDataVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryDataVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryDataVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryDataVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryDataVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataContainerRegistryDataContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataContainerRegistryDataContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataContainerRegistryDataContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataContainerRegistryDataContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataContainerOperationSource(Client), _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics.CreateScope("MachineLearningRegistryDataContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataContainerOperationSource(Client), _machineLearningRegistryDataContainerRegistryDataContainersClientDiagnostics, Pipeline, _machineLearningRegistryDataContainerRegistryDataContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs new file mode 100644 index 0000000000000..f6c2dd3a2e823 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryDataVersions method from an instance of . + /// + public partial class MachineLearningRegistryDataVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics; + private readonly RegistryDataVersionsRestOperations _machineLearningRegistryDataVersionRegistryDataVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryDataVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryDataVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryDataVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryDataVersionResource.ResourceType, out string machineLearningRegistryDataVersionRegistryDataVersionsApiVersion); + _machineLearningRegistryDataVersionRegistryDataVersionsRestClient = new RegistryDataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryDataVersionRegistryDataVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryDataContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryDataContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataVersionOperationSource(Client), _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataVersionOperationSource(Client), _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List data versions in the data container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions + /// + /// + /// Operation Id + /// RegistryDataVersions_List + /// + /// + /// + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryDataVersionResource(Client, MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(e)), _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryDataVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List data versions in the data container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions + /// + /// + /// Operation Id + /// RegistryDataVersions_List + /// + /// + /// + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryDataVersionResource(Client, MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(e)), _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryDataVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs new file mode 100644 index 0000000000000..df1bdeab1abde --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryDataVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryDataVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryDataVersion method. + /// + public partial class MachineLearningRegistryDataVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics; + private readonly RegistryDataVersionsRestOperations _machineLearningRegistryDataVersionRegistryDataVersionsRestClient; + private readonly MachineLearningDataVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryDataVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryDataVersionResource(ArmClient client, MachineLearningDataVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryDataVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryDataVersionRegistryDataVersionsApiVersion); + _machineLearningRegistryDataVersionRegistryDataVersionsRestClient = new RegistryDataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryDataVersionRegistryDataVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/data/versions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningDataVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataVersionOperationSource(Client), _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version} + /// + /// + /// Operation Id + /// RegistryDataVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryDataVersionOperationSource(Client), _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics, Pipeline, _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate a storage location and credential for the client to upload a data asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// RegistryDataVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrGetStartPendingUploadAsync(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = await _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateOrGetStartPendingUploadAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate a storage location and credential for the client to upload a data asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// RegistryDataVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual Response CreateOrGetStartPendingUpload(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningRegistryDataVersionRegistryDataVersionsClientDiagnostics.CreateScope("MachineLearningRegistryDataVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = _machineLearningRegistryDataVersionRegistryDataVersionsRestClient.CreateOrGetStartPendingUpload(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs new file mode 100644 index 0000000000000..f4b05827ec842 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryEnvironmentContainers method from an instance of . + /// + public partial class MachineLearningRegistryEnvironmentContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics; + private readonly RegistryEnvironmentContainersRestOperations _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryEnvironmentContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryEnvironmentContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryEnvironmentContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryEnvironmentContainerResource.ResourceType, out string machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersApiVersion); + _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient = new RegistryEnvironmentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryResource.ResourceType), nameof(id)); + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string environmentName, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentContainerOperationSource(Client), _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string environmentName, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentContainerOperationSource(Client), _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List environment containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryEnvironmentContainerResource(Client, MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(e)), _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, "MachineLearningRegistryEnvironmentContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List environment containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryEnvironmentContainerResource(Client, MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(e)), _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, "MachineLearningRegistryEnvironmentContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs new file mode 100644 index 0000000000000..d8d26cf9f4919 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryEnvironmentContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryEnvironmentContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryEnvironmentContainer method. + /// + public partial class MachineLearningRegistryEnvironmentContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string environmentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics; + private readonly RegistryEnvironmentContainersRestOperations _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient; + private readonly MachineLearningEnvironmentContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryEnvironmentContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryEnvironmentContainerResource(ArmClient client, MachineLearningEnvironmentContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryEnvironmentContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersApiVersion); + _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient = new RegistryEnvironmentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/environments"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningEnvironmentContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningRegistryEnvironmentVersionResources in the MachineLearningRegistryEnvironmentContainer. + /// An object representing collection of MachineLearningRegistryEnvironmentVersionResources and their operations over a MachineLearningRegistryEnvironmentVersionResource. + public virtual MachineLearningRegistryEnvironmentVersionCollection GetMachineLearningRegistryEnvironmentVersions() + { + return GetCachedClient(Client => new MachineLearningRegistryEnvironmentVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryEnvironmentVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryEnvironmentVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryEnvironmentVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryEnvironmentVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentContainerOperationSource(Client), _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentContainerOperationSource(Client), _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentContainerRegistryEnvironmentContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs new file mode 100644 index 0000000000000..efedf1af0bfc0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryEnvironmentVersions method from an instance of . + /// + public partial class MachineLearningRegistryEnvironmentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics; + private readonly RegistryEnvironmentVersionsRestOperations _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryEnvironmentVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryEnvironmentVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryEnvironmentVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryEnvironmentVersionResource.ResourceType, out string machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsApiVersion); + _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient = new RegistryEnvironmentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryEnvironmentContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryEnvironmentContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentVersionOperationSource(Client), _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentVersionOperationSource(Client), _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryEnvironmentVersionResource(Client, MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(e)), _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryEnvironmentVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_List + /// + /// + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, stage); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryEnvironmentVersionResource(Client, MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(e)), _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryEnvironmentVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs new file mode 100644 index 0000000000000..70ba7ca91e415 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryEnvironmentVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryEnvironmentVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryEnvironmentVersion method. + /// + public partial class MachineLearningRegistryEnvironmentVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics; + private readonly RegistryEnvironmentVersionsRestOperations _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient; + private readonly MachineLearningEnvironmentVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryEnvironmentVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryEnvironmentVersionResource(ArmClient client, MachineLearningEnvironmentVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryEnvironmentVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsApiVersion); + _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient = new RegistryEnvironmentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/environments/versions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningEnvironmentVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentVersionOperationSource(Client), _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryEnvironmentVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningRegistryEnvironmentVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryEnvironmentVersionOperationSource(Client), _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsClientDiagnostics, Pipeline, _machineLearningRegistryEnvironmentVersionRegistryEnvironmentVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs new file mode 100644 index 0000000000000..08d2fb148f50e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryModelContainers method from an instance of . + /// + public partial class MachineLearningRegistryModelContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics; + private readonly RegistryModelContainersRestOperations _machineLearningRegistryModelContainerRegistryModelContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryModelContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryModelContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryModelContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryModelContainerResource.ResourceType, out string machineLearningRegistryModelContainerRegistryModelContainersApiVersion); + _machineLearningRegistryModelContainerRegistryModelContainersRestClient = new RegistryModelContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryModelContainerRegistryModelContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryResource.ResourceType), nameof(id)); + } + + /// + /// Create or update model container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string modelName, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelContainerOperationSource(Client), _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update model container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string modelName, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelContainerOperationSource(Client), _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelContainerRegistryModelContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelContainerRegistryModelContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List model containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models + /// + /// + /// Operation Id + /// RegistryModelContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryModelContainerResource(Client, MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(e)), _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, "MachineLearningRegistryModelContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List model containers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models + /// + /// + /// Operation Id + /// RegistryModelContainers_List + /// + /// + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryModelContainerResource(Client, MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(e)), _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, "MachineLearningRegistryModelContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelContainerRegistryModelContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelContainerRegistryModelContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelContainerRegistryModelContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelContainerRegistryModelContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, modelName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs new file mode 100644 index 0000000000000..abf169fd56a67 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs @@ -0,0 +1,350 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryModelContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryModelContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryModelContainer method. + /// + public partial class MachineLearningRegistryModelContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string modelName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics; + private readonly RegistryModelContainersRestOperations _machineLearningRegistryModelContainerRegistryModelContainersRestClient; + private readonly MachineLearningModelContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryModelContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryModelContainerResource(ArmClient client, MachineLearningModelContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryModelContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryModelContainerRegistryModelContainersApiVersion); + _machineLearningRegistryModelContainerRegistryModelContainersRestClient = new RegistryModelContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryModelContainerRegistryModelContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/models"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningModelContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningRegistryModelVersionResources in the MachineLearningRegistryModelContainer. + /// An object representing collection of MachineLearningRegistryModelVersionResources and their operations over a MachineLearningRegistryModelVersionResource. + public virtual MachineLearningRegistryModelVersionCollection GetMachineLearningRegistryModelVersions() + { + return GetCachedClient(Client => new MachineLearningRegistryModelVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryModelVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryModelVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryModelVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryModelVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelContainerRegistryModelContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelContainerRegistryModelContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelContainerRegistryModelContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelContainerRegistryModelContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update model container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelContainerOperationSource(Client), _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update model container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics.CreateScope("MachineLearningRegistryModelContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelContainerOperationSource(Client), _machineLearningRegistryModelContainerRegistryModelContainersClientDiagnostics, Pipeline, _machineLearningRegistryModelContainerRegistryModelContainersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs new file mode 100644 index 0000000000000..1ebb8496a4bd2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetMachineLearningRegistryModelVersions method from an instance of . + /// + public partial class MachineLearningRegistryModelVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics; + private readonly RegistryModelVersionsRestOperations _machineLearningRegistryModelVersionRegistryModelVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryModelVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal MachineLearningRegistryModelVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryModelVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningRegistryModelVersionResource.ResourceType, out string machineLearningRegistryModelVersionRegistryModelVersionsApiVersion); + _machineLearningRegistryModelVersionRegistryModelVersionsRestClient = new RegistryModelVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryModelVersionRegistryModelVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningRegistryModelContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningRegistryModelContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelVersionOperationSource(Client), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelVersionOperationSource(Client), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions + /// + /// + /// Operation Id + /// RegistryModelVersions_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(MachineLearningRegistryModelVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningRegistryModelVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Tags, options.Properties, options.ListViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Tags, options.Properties, options.ListViewType); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryModelVersionResource(Client, MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(e)), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryModelVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions + /// + /// + /// Operation Id + /// RegistryModelVersions_List + /// + /// + /// + /// A property bag which contains all the parameters of this method except the LRO qualifier and request context parameter. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(MachineLearningRegistryModelVersionCollectionGetAllOptions options, CancellationToken cancellationToken = default) + { + options ??= new MachineLearningRegistryModelVersionCollectionGetAllOptions(); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Tags, options.Properties, options.ListViewType); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options.Skip, options.OrderBy, options.Top, options.Version, options.Description, options.Tags, options.Properties, options.ListViewType); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryModelVersionResource(Client, MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(e)), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, "MachineLearningRegistryModelVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll(options: null).GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(options: null, cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs new file mode 100644 index 0000000000000..388c0e1eb1544 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistryModelVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryModelVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistryModelVersion method. + /// + public partial class MachineLearningRegistryModelVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics; + private readonly RegistryModelVersionsRestOperations _machineLearningRegistryModelVersionRegistryModelVersionsRestClient; + private readonly MachineLearningModelVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryModelVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryModelVersionResource(ArmClient client, MachineLearningModelVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryModelVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryModelVersionRegistryModelVersionsApiVersion); + _machineLearningRegistryModelVersionRegistryModelVersionsRestClient = new RegistryModelVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryModelVersionRegistryModelVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries/models/versions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningModelVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelVersionOperationSource(Client), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version} + /// + /// + /// Operation Id + /// RegistryModelVersions_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryModelVersionOperationSource(Client), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Model Version Package operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/package + /// + /// + /// Operation Id + /// RegistryModelVersions_Package + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Package operation request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> PackageAsync(WaitUntil waitUntil, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Package"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.PackageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new ModelPackageResultOperationSource(), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreatePackageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Model Version Package operation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/package + /// + /// + /// Operation Id + /// RegistryModelVersions_Package + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Package operation request body. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Package(WaitUntil waitUntil, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.Package"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.Package(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new MachineLearningArmOperation(new ModelPackageResultOperationSource(), _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics, Pipeline, _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreatePackageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate a storage location and credential for the client to upload a model asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// RegistryModelVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrGetStartPendingUploadAsync(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = await _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateOrGetStartPendingUploadAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate a storage location and credential for the client to upload a model asset to. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload + /// + /// + /// Operation Id + /// RegistryModelVersions_CreateOrGetStartPendingUpload + /// + /// + /// + /// Pending upload request object. + /// The cancellation token to use. + /// is null. + public virtual Response CreateOrGetStartPendingUpload(PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningRegistryModelVersionRegistryModelVersionsClientDiagnostics.CreateScope("MachineLearningRegistryModelVersionResource.CreateOrGetStartPendingUpload"); + scope.Start(); + try + { + var response = _machineLearningRegistryModelVersionRegistryModelVersionsRestClient.CreateOrGetStartPendingUpload(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs new file mode 100644 index 0000000000000..be4f72d7662ee --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs @@ -0,0 +1,943 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningRegistry along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetMachineLearningRegistryResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningRegistry method. + /// + public partial class MachineLearningRegistryResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningRegistryRegistriesClientDiagnostics; + private readonly RegistriesRestOperations _machineLearningRegistryRegistriesRestClient; + private readonly MachineLearningRegistryData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningRegistryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningRegistryResource(ArmClient client, MachineLearningRegistryData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MachineLearningRegistryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningRegistryRegistriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningRegistryRegistriesApiVersion); + _machineLearningRegistryRegistriesRestClient = new RegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningRegistryRegistriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/registries"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual MachineLearningRegistryData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of MachineLearningRegistryCodeContainerResources in the MachineLearningRegistry. + /// An object representing collection of MachineLearningRegistryCodeContainerResources and their operations over a MachineLearningRegistryCodeContainerResource. + public virtual MachineLearningRegistryCodeContainerCollection GetMachineLearningRegistryCodeContainers() + { + return GetCachedClient(Client => new MachineLearningRegistryCodeContainerCollection(Client, Id)); + } + + /// + /// Get Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryCodeContainerAsync(string codeName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryCodeContainers().GetAsync(codeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Code container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName} + /// + /// + /// Operation Id + /// RegistryCodeContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryCodeContainer(string codeName, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryCodeContainers().Get(codeName, cancellationToken); + } + + /// Gets a collection of MachineLearninRegistryComponentContainerResources in the MachineLearningRegistry. + /// An object representing collection of MachineLearninRegistryComponentContainerResources and their operations over a MachineLearninRegistryComponentContainerResource. + public virtual MachineLearninRegistryComponentContainerCollection GetMachineLearninRegistryComponentContainers() + { + return GetCachedClient(Client => new MachineLearninRegistryComponentContainerCollection(Client, Id)); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearninRegistryComponentContainerAsync(string componentName, CancellationToken cancellationToken = default) + { + return await GetMachineLearninRegistryComponentContainers().GetAsync(componentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName} + /// + /// + /// Operation Id + /// RegistryComponentContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearninRegistryComponentContainer(string componentName, CancellationToken cancellationToken = default) + { + return GetMachineLearninRegistryComponentContainers().Get(componentName, cancellationToken); + } + + /// Gets a collection of MachineLearningRegistryDataContainerResources in the MachineLearningRegistry. + /// An object representing collection of MachineLearningRegistryDataContainerResources and their operations over a MachineLearningRegistryDataContainerResource. + public virtual MachineLearningRegistryDataContainerCollection GetMachineLearningRegistryDataContainers() + { + return GetCachedClient(Client => new MachineLearningRegistryDataContainerCollection(Client, Id)); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryDataContainerAsync(string name, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryDataContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name} + /// + /// + /// Operation Id + /// RegistryDataContainers_Get + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryDataContainer(string name, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryDataContainers().Get(name, cancellationToken); + } + + /// Gets a collection of MachineLearningRegistryEnvironmentContainerResources in the MachineLearningRegistry. + /// An object representing collection of MachineLearningRegistryEnvironmentContainerResources and their operations over a MachineLearningRegistryEnvironmentContainerResource. + public virtual MachineLearningRegistryEnvironmentContainerCollection GetMachineLearningRegistryEnvironmentContainers() + { + return GetCachedClient(Client => new MachineLearningRegistryEnvironmentContainerCollection(Client, Id)); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryEnvironmentContainerAsync(string environmentName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryEnvironmentContainers().GetAsync(environmentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName} + /// + /// + /// Operation Id + /// RegistryEnvironmentContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryEnvironmentContainer(string environmentName, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryEnvironmentContainers().Get(environmentName, cancellationToken); + } + + /// Gets a collection of MachineLearningRegistryModelContainerResources in the MachineLearningRegistry. + /// An object representing collection of MachineLearningRegistryModelContainerResources and their operations over a MachineLearningRegistryModelContainerResource. + public virtual MachineLearningRegistryModelContainerCollection GetMachineLearningRegistryModelContainers() + { + return GetCachedClient(Client => new MachineLearningRegistryModelContainerCollection(Client, Id)); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningRegistryModelContainerAsync(string modelName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningRegistryModelContainers().GetAsync(modelName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName} + /// + /// + /// Operation Id + /// RegistryModelContainers_Get + /// + /// + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningRegistryModelContainer(string modelName, CancellationToken cancellationToken = default) + { + return GetMachineLearningRegistryModelContainers().Get(modelName, cancellationToken); + } + + /// + /// Get registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.Get"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningRegistryRegistriesClientDiagnostics, Pipeline, _machineLearningRegistryRegistriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningRegistryRegistriesClientDiagnostics, Pipeline, _machineLearningRegistryRegistriesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update tags + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Update + /// + /// + /// + /// Details required to create the registry. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(MachineLearningRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update tags + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Update + /// + /// + /// + /// Details required to create the registry. + /// The cancellation token to use. + /// is null. + public virtual Response Update(MachineLearningRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.Update"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new MachineLearningRegistryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove regions from registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions + /// + /// + /// Operation Id + /// Registries_RemoveRegions + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Details required to create the registry. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveRegionsAsync(WaitUntil waitUntil, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.RemoveRegions"); + scope.Start(); + try + { + var response = await _machineLearningRegistryRegistriesRestClient.RemoveRegionsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryOperationSource(Client), _machineLearningRegistryRegistriesClientDiagnostics, Pipeline, _machineLearningRegistryRegistriesRestClient.CreateRemoveRegionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove regions from registry + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions + /// + /// + /// Operation Id + /// Registries_RemoveRegions + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Details required to create the registry. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RemoveRegions(WaitUntil waitUntil, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.RemoveRegions"); + scope.Start(); + try + { + var response = _machineLearningRegistryRegistriesRestClient.RemoveRegions(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningRegistryOperationSource(Client), _machineLearningRegistryRegistriesClientDiagnostics, Pipeline, _machineLearningRegistryRegistriesRestClient.CreateRemoveRegionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningRegistryRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningRegistryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningRegistryPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningRegistryRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningRegistryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningRegistryPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningRegistryRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningRegistryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningRegistryPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningRegistryRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningRegistryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningRegistryPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningRegistryRegistriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningRegistryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningRegistryPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// + /// + /// Operation Id + /// Registries_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningRegistryRegistriesClientDiagnostics.CreateScope("MachineLearningRegistryResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningRegistryRegistriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningRegistryResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningRegistryPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs index 9a4119955af29..4d19b2706dc15 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs @@ -83,7 +83,7 @@ public virtual async Task> CreateO try { var response = await _machineLearningScheduleSchedulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -124,7 +124,7 @@ public virtual ArmOperation CreateOrUpdate(Wait try { var response = _machineLearningScheduleSchedulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs index a2f5f864d1d22..7ba5e30237487 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs @@ -244,7 +244,7 @@ public virtual async Task> UpdateA try { var response = await _machineLearningScheduleSchedulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -282,7 +282,7 @@ public virtual ArmOperation Update(WaitUntil wa try { var response = _machineLearningScheduleSchedulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.OriginalUri); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs index d9e845e5e7f0a..53f21ed42c070 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs @@ -224,12 +224,13 @@ public virtual Response Get(string workspaceNa /// /// /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string skip = null, string kind = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip, kind); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip, kind); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -247,12 +248,13 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string skip = null, string kind = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip, kind); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip, kind); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceCollection.GetAll", "value", "nextLink", cancellationToken); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs index 4b389d7481fed..86537a1058259 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs @@ -54,6 +54,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// + /// Create or update machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -94,6 +95,7 @@ public virtual async Task + /// Create or update machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -134,6 +136,7 @@ public virtual ArmOperation CreateOr } /// + /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -170,6 +173,7 @@ public virtual async Task> } /// + /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -206,6 +210,7 @@ public virtual Response Get(string c } /// + /// Lists all the available machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -229,6 +234,7 @@ public virtual AsyncPageable GetAllA } /// + /// Lists all the available machine learning workspaces connections under the specified workspace. /// /// /// Request Path diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionData.cs index f21bd31072c55..f199a21716668 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionData.cs @@ -18,7 +18,7 @@ public partial class MachineLearningWorkspaceConnectionData : ResourceData /// Initializes a new instance of MachineLearningWorkspaceConnectionData. /// /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , , , and . /// /// is null. public MachineLearningWorkspaceConnectionData(MachineLearningWorkspaceConnectionProperties properties) @@ -35,7 +35,7 @@ public MachineLearningWorkspaceConnectionData(MachineLearningWorkspaceConnection /// The systemData. /// /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , , , and . /// internal MachineLearningWorkspaceConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningWorkspaceConnectionProperties properties) : base(id, name, resourceType, systemData) { @@ -45,7 +45,7 @@ internal MachineLearningWorkspaceConnectionData(ResourceIdentifier id, string na /// /// Gets or sets the properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , , , and . /// public MachineLearningWorkspaceConnectionProperties Properties { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs index 19341564c8f5a..f9127200809ee 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs @@ -13,6 +13,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; namespace Azure.ResourceManager.MachineLearning { @@ -87,6 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// + /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -118,6 +120,7 @@ public virtual async Task> } /// + /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -149,6 +152,7 @@ public virtual Response Get(Cancella } /// + /// Delete machine learning workspaces connections by name. /// /// /// Request Path @@ -182,6 +186,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// + /// Delete machine learning workspaces connections by name. /// /// /// Request Path @@ -215,6 +220,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// + /// Update machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -222,27 +228,23 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// WorkspaceConnections_Create + /// WorkspaceConnections_Update /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The object for creating or updating a new workspace connection. + /// Parameters for workspace connection update. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); scope.Start(); try { - var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -252,6 +254,7 @@ public virtual async Task + /// Update machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -259,27 +262,83 @@ public virtual async Task /// /// Operation Id - /// WorkspaceConnections_Create + /// WorkspaceConnections_Update /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The object for creating or updating a new workspace connection. + /// Parameters for workspace connection update. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + /// is null. + public virtual Response Update(MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); scope.Start(); try { - var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all the secrets of a machine learning workspaces connections. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets + /// + /// + /// Operation Id + /// WorkspaceConnections_ListSecrets + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetSecretsAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.GetSecrets"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.ListSecretsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all the secrets of a machine learning workspaces connections. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets + /// + /// + /// Operation Id + /// WorkspaceConnections_ListSecrets + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetSecrets(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.GetSecrets"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.ListSecrets(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs index dcd7fb2b7ea4e..20d57add08b89 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs @@ -23,8 +23,13 @@ public partial class MachineLearningWorkspaceData : TrackedResourceData /// The location. public MachineLearningWorkspaceData(AzureLocation location) : base(location) { + AssociatedWorkspaces = new ChangeTrackingList(); + ContainerRegistries = new ChangeTrackingList(); + ExistingWorkspaces = new ChangeTrackingList(); + KeyVaults = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); SharedPrivateLinkResources = new ChangeTrackingList(); + StorageAccounts = new ChangeTrackingList(); } /// Initializes a new instance of MachineLearningWorkspaceData. @@ -34,109 +39,149 @@ public MachineLearningWorkspaceData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The identity of the resource. - /// The sku of the workspace. - /// The immutable id associated with this workspace. - /// The description of this workspace. - /// The friendly name for this workspace. This name in mutable. - /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + /// Managed service identity (system assigned and/or user assigned identities). + /// + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The flag to indicate whether to allow public access when behind VNet. /// ARM id of the application insights associated with this workspace. + /// + /// /// ARM id of the container registry associated with this workspace. - /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + /// The description of this workspace. /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. - /// The encryption settings of Azure ML workspace. + /// + /// + /// + /// Settings for feature store type workspace. + /// The friendly name for this workspace. This name in mutable. /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. - /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. - /// Count of private connections in the workspace. + /// /// The compute name for image build. - /// The flag to indicate whether to allow public access when behind VNet. - /// Whether requests from Public Network are allowed. - /// The list of private endpoint connections in the workspace. - /// The list of shared private link resources in this workspace. + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + /// + /// Managed Network settings for a machine learning workspace. + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. /// The notebook info of Azure ML workspace. - /// The service managed resource settings. /// The user assigned identity resource id that represents the workspace identity. - /// The tenant id associated with this workspace. + /// The list of private endpoint connections in the workspace. + /// Count of private connections in the workspace. + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// Whether requests from Public Network are allowed. + /// The service managed resource settings. + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + /// The list of shared private link resources in this workspace. + /// Retention time in days after workspace get soft deleted. + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + /// /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. - /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + /// The auth mode used for accessing the system datastores of the workspace. + /// The tenant id associated with this workspace. /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, string workspaceId, string description, string friendlyName, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, Uri discoveryUri, MachineLearningProvisioningState? provisioningState, MachineLearningEncryptionSetting encryption, bool? isHbiWorkspace, string serviceProvisionedResourceGroup, int? privateLinkCount, string imageBuildCompute, bool? allowPublicAccessWhenBehindVnet, MachineLearningPublicNetworkAccess? publicNetworkAccess, IReadOnlyList privateEndpointConnections, IList sharedPrivateLinkResources, MachineLearningNotebookResourceInfo notebookInfo, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string primaryUserAssignedIdentity, Guid? tenantId, bool? isStorageHnsEnabled, Uri mlFlowTrackingUri, bool? isV1LegacyMode) : base(id, name, resourceType, systemData, tags, location) + /// WorkspaceHub's configuration object. + /// The immutable id associated with this workspace. + internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningSku sku, bool? allowPublicAccessWhenBehindVnet, string applicationInsights, IList associatedWorkspaces, IList containerRegistries, string containerRegistry, string description, Uri discoveryUri, bool? enableDataIsolation, MachineLearningEncryptionSetting encryption, IList existingWorkspaces, FeatureStoreSettings featureStoreSettings, string friendlyName, bool? isHbiWorkspace, ResourceIdentifier hubResourceId, string imageBuildCompute, string keyVault, IList keyVaults, ManagedNetworkSettings managedNetwork, Uri mlFlowTrackingUri, MachineLearningNotebookResourceInfo notebookInfo, string primaryUserAssignedIdentity, IReadOnlyList privateEndpointConnections, int? privateLinkCount, MachineLearningProvisioningState? provisioningState, MachineLearningPublicNetworkAccessType? publicNetworkAccessType, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string serviceProvisionedResourceGroup, IList sharedPrivateLinkResources, int? softDeleteRetentionInDays, string storageAccount, IList storageAccounts, bool? isStorageHnsEnabled, string systemDatastoresAuthMode, Guid? tenantId, bool? isV1LegacyMode, WorkspaceHubConfig workspaceHubConfig, string workspaceId) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; + Kind = kind; Sku = sku; - WorkspaceId = workspaceId; - Description = description; - FriendlyName = friendlyName; - KeyVault = keyVault; + AllowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; ApplicationInsights = applicationInsights; + AssociatedWorkspaces = associatedWorkspaces; + ContainerRegistries = containerRegistries; ContainerRegistry = containerRegistry; - StorageAccount = storageAccount; + Description = description; DiscoveryUri = discoveryUri; - ProvisioningState = provisioningState; + EnableDataIsolation = enableDataIsolation; Encryption = encryption; + ExistingWorkspaces = existingWorkspaces; + FeatureStoreSettings = featureStoreSettings; + FriendlyName = friendlyName; IsHbiWorkspace = isHbiWorkspace; - ServiceProvisionedResourceGroup = serviceProvisionedResourceGroup; - PrivateLinkCount = privateLinkCount; + HubResourceId = hubResourceId; ImageBuildCompute = imageBuildCompute; - AllowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; - PublicNetworkAccess = publicNetworkAccess; - PrivateEndpointConnections = privateEndpointConnections; - SharedPrivateLinkResources = sharedPrivateLinkResources; + KeyVault = keyVault; + KeyVaults = keyVaults; + ManagedNetwork = managedNetwork; + MlFlowTrackingUri = mlFlowTrackingUri; NotebookInfo = notebookInfo; - ServiceManagedResourcesSettings = serviceManagedResourcesSettings; PrimaryUserAssignedIdentity = primaryUserAssignedIdentity; - TenantId = tenantId; + PrivateEndpointConnections = privateEndpointConnections; + PrivateLinkCount = privateLinkCount; + ProvisioningState = provisioningState; + PublicNetworkAccessType = publicNetworkAccessType; + ServiceManagedResourcesSettings = serviceManagedResourcesSettings; + ServiceProvisionedResourceGroup = serviceProvisionedResourceGroup; + SharedPrivateLinkResources = sharedPrivateLinkResources; + SoftDeleteRetentionInDays = softDeleteRetentionInDays; + StorageAccount = storageAccount; + StorageAccounts = storageAccounts; IsStorageHnsEnabled = isStorageHnsEnabled; - MlFlowTrackingUri = mlFlowTrackingUri; + SystemDatastoresAuthMode = systemDatastoresAuthMode; + TenantId = tenantId; IsV1LegacyMode = isV1LegacyMode; + WorkspaceHubConfig = workspaceHubConfig; + WorkspaceId = workspaceId; } - /// The identity of the resource. + /// Managed service identity (system assigned and/or user assigned identities). public ManagedServiceIdentity Identity { get; set; } - /// The sku of the workspace. + /// Gets or sets the kind. + public string Kind { get; set; } + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. public MachineLearningSku Sku { get; set; } - /// The immutable id associated with this workspace. - public string WorkspaceId { get; } - /// The description of this workspace. - public string Description { get; set; } - /// The friendly name for this workspace. This name in mutable. - public string FriendlyName { get; set; } - /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. - public string KeyVault { get; set; } + /// The flag to indicate whether to allow public access when behind VNet. + public bool? AllowPublicAccessWhenBehindVnet { get; set; } /// ARM id of the application insights associated with this workspace. public string ApplicationInsights { get; set; } + /// Gets the associated workspaces. + public IList AssociatedWorkspaces { get; } + /// Gets the container registries. + public IList ContainerRegistries { get; } /// ARM id of the container registry associated with this workspace. public string ContainerRegistry { get; set; } - /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. - public string StorageAccount { get; set; } + /// The description of this workspace. + public string Description { get; set; } /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. public Uri DiscoveryUri { get; set; } - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. - public MachineLearningProvisioningState? ProvisioningState { get; } - /// The encryption settings of Azure ML workspace. + /// Gets or sets the enable data isolation. + public bool? EnableDataIsolation { get; set; } + /// Gets or sets the encryption. public MachineLearningEncryptionSetting Encryption { get; set; } + /// Gets the existing workspaces. + public IList ExistingWorkspaces { get; } + /// Settings for feature store type workspace. + public FeatureStoreSettings FeatureStoreSettings { get; set; } + /// The friendly name for this workspace. This name in mutable. + public string FriendlyName { get; set; } /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. public bool? IsHbiWorkspace { get; set; } - /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. - public string ServiceProvisionedResourceGroup { get; } - /// Count of private connections in the workspace. - public int? PrivateLinkCount { get; } + /// Gets or sets the hub resource id. + public ResourceIdentifier HubResourceId { get; set; } /// The compute name for image build. public string ImageBuildCompute { get; set; } - /// The flag to indicate whether to allow public access when behind VNet. - public bool? AllowPublicAccessWhenBehindVnet { get; set; } - /// Whether requests from Public Network are allowed. - public MachineLearningPublicNetworkAccess? PublicNetworkAccess { get; set; } - /// The list of private endpoint connections in the workspace. - public IReadOnlyList PrivateEndpointConnections { get; } - /// The list of shared private link resources in this workspace. - public IList SharedPrivateLinkResources { get; } + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + public string KeyVault { get; set; } + /// Gets the key vaults. + public IList KeyVaults { get; } + /// Managed Network settings for a machine learning workspace. + public ManagedNetworkSettings ManagedNetwork { get; set; } + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + public Uri MlFlowTrackingUri { get; } /// The notebook info of Azure ML workspace. public MachineLearningNotebookResourceInfo NotebookInfo { get; } + /// The user assigned identity resource id that represents the workspace identity. + public string PrimaryUserAssignedIdentity { get; set; } + /// The list of private endpoint connections in the workspace. + public IReadOnlyList PrivateEndpointConnections { get; } + /// Count of private connections in the workspace. + public int? PrivateLinkCount { get; } + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + public MachineLearningProvisioningState? ProvisioningState { get; } + /// Whether requests from Public Network are allowed. + public MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get; set; } /// The service managed resource settings. internal ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } - /// The throughput of the collections in cosmosdb database. + /// Gets or sets the cosmos db collections throughput. public int? CosmosDbCollectionsThroughput { get => ServiceManagedResourcesSettings is null ? default : ServiceManagedResourcesSettings.CosmosDbCollectionsThroughput; @@ -148,15 +193,27 @@ public int? CosmosDbCollectionsThroughput } } - /// The user assigned identity resource id that represents the workspace identity. - public string PrimaryUserAssignedIdentity { get; set; } - /// The tenant id associated with this workspace. - public Guid? TenantId { get; } + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + public string ServiceProvisionedResourceGroup { get; } + /// The list of shared private link resources in this workspace. + public IList SharedPrivateLinkResources { get; } + /// Retention time in days after workspace get soft deleted. + public int? SoftDeleteRetentionInDays { get; set; } + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + public string StorageAccount { get; set; } + /// Gets the storage accounts. + public IList StorageAccounts { get; } /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. public bool? IsStorageHnsEnabled { get; } - /// The URI associated with this workspace that machine learning flow must point at to set up tracking. - public Uri MlFlowTrackingUri { get; } + /// The auth mode used for accessing the system datastores of the workspace. + public string SystemDatastoresAuthMode { get; set; } + /// The tenant id associated with this workspace. + public Guid? TenantId { get; } /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. public bool? IsV1LegacyMode { get; set; } + /// WorkspaceHub's configuration object. + public WorkspaceHubConfig WorkspaceHubConfig { get; set; } + /// The immutable id associated with this workspace. + public string WorkspaceId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs index 96a5d38237cf4..e67a157de249c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs @@ -37,10 +37,12 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _machineLearningWorkspaceWorkspacesClientDiagnostics; private readonly WorkspacesRestOperations _machineLearningWorkspaceWorkspacesRestClient; - private readonly ClientDiagnostics _privateLinkResourcesClientDiagnostics; - private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient; private readonly ClientDiagnostics _workspaceFeaturesClientDiagnostics; private readonly WorkspaceFeaturesRestOperations _workspaceFeaturesRestClient; + private readonly ClientDiagnostics _privateLinkResourcesClientDiagnostics; + private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient; + private readonly ClientDiagnostics _managedNetworkProvisionsClientDiagnostics; + private readonly ManagedNetworkProvisionsRestOperations _managedNetworkProvisionsRestClient; private readonly MachineLearningWorkspaceData _data; /// Initializes a new instance of the class for mocking. @@ -65,10 +67,12 @@ internal MachineLearningWorkspaceResource(ArmClient client, ResourceIdentifier i _machineLearningWorkspaceWorkspacesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string machineLearningWorkspaceWorkspacesApiVersion); _machineLearningWorkspaceWorkspacesRestClient = new WorkspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningWorkspaceWorkspacesApiVersion); - _privateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _workspaceFeaturesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); _workspaceFeaturesRestClient = new WorkspaceFeaturesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _privateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _managedNetworkProvisionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _managedNetworkProvisionsRestClient = new ManagedNetworkProvisionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -151,168 +155,170 @@ public virtual Response GetMachineLearningComput return GetMachineLearningComputes().Get(computeName, cancellationToken); } - /// Gets a collection of MachineLearningPrivateEndpointConnectionResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningPrivateEndpointConnectionResources and their operations over a MachineLearningPrivateEndpointConnectionResource. - public virtual MachineLearningPrivateEndpointConnectionCollection GetMachineLearningPrivateEndpointConnections() + /// Gets a collection of MachineLearningCodeContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningCodeContainerResources and their operations over a MachineLearningCodeContainerResource. + public virtual MachineLearningCodeContainerCollection GetMachineLearningCodeContainers() { - return GetCachedClient(Client => new MachineLearningPrivateEndpointConnectionCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningCodeContainerCollection(Client, Id)); } /// - /// Gets the specified private endpoint connection associated with the workspace. + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// CodeContainers_Get /// /// /// - /// The name of the private endpoint connection associated with the workspace. + /// Container name. This is case-sensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningCodeContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMachineLearningPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningCodeContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// - /// Gets the specified private endpoint connection associated with the workspace. + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// CodeContainers_Get /// /// /// - /// The name of the private endpoint connection associated with the workspace. + /// Container name. This is case-sensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningCodeContainer(string name, CancellationToken cancellationToken = default) { - return GetMachineLearningPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); + return GetMachineLearningCodeContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningWorkspaceConnectionResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningWorkspaceConnectionResources and their operations over a MachineLearningWorkspaceConnectionResource. - public virtual MachineLearningWorkspaceConnectionCollection GetMachineLearningWorkspaceConnections() + /// Gets a collection of MachineLearningComponentContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningComponentContainerResources and their operations over a MachineLearningComponentContainerResource. + public virtual MachineLearningComponentContainerCollection GetMachineLearningComponentContainers() { - return GetCachedClient(Client => new MachineLearningWorkspaceConnectionCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningComponentContainerCollection(Client, Id)); } /// + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} /// /// /// Operation Id - /// WorkspaceConnections_Get + /// ComponentContainers_Get /// /// /// - /// Friendly name of the workspace connection. + /// Container name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningWorkspaceConnectionAsync(string connectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningComponentContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMachineLearningWorkspaceConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningComponentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} /// /// /// Operation Id - /// WorkspaceConnections_Get + /// ComponentContainers_Get /// /// /// - /// Friendly name of the workspace connection. + /// Container name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningWorkspaceConnection(string connectionName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningComponentContainer(string name, CancellationToken cancellationToken = default) { - return GetMachineLearningWorkspaceConnections().Get(connectionName, cancellationToken); + return GetMachineLearningComponentContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningBatchEndpointResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningBatchEndpointResources and their operations over a MachineLearningBatchEndpointResource. - public virtual MachineLearningBatchEndpointCollection GetMachineLearningBatchEndpoints() + /// Gets a collection of MachineLearningDataContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningDataContainerResources and their operations over a MachineLearningDataContainerResource. + public virtual MachineLearningDataContainerCollection GetMachineLearningDataContainers() { - return GetCachedClient(Client => new MachineLearningBatchEndpointCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningDataContainerCollection(Client, Id)); } /// - /// Gets a batch inference endpoint by name. + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} /// /// /// Operation Id - /// BatchEndpoints_Get + /// DataContainers_Get /// /// /// - /// Name for the Batch Endpoint. + /// Container name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningBatchEndpointAsync(string endpointName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningDataContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMachineLearningBatchEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningDataContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// - /// Gets a batch inference endpoint by name. + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} /// /// /// Operation Id - /// BatchEndpoints_Get + /// DataContainers_Get /// /// /// - /// Name for the Batch Endpoint. + /// Container name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningBatchEndpoint(string endpointName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningDataContainer(string name, CancellationToken cancellationToken = default) { - return GetMachineLearningBatchEndpoints().Get(endpointName, cancellationToken); + return GetMachineLearningDataContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningCodeContainerResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningCodeContainerResources and their operations over a MachineLearningCodeContainerResource. - public virtual MachineLearningCodeContainerCollection GetMachineLearningCodeContainers() + /// Gets a collection of MachineLearningEnvironmentContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningEnvironmentContainerResources and their operations over a MachineLearningEnvironmentContainerResource. + public virtual MachineLearningEnvironmentContainerCollection GetMachineLearningEnvironmentContainers() { - return GetCachedClient(Client => new MachineLearningCodeContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningEnvironmentContainerCollection(Client, Id)); } /// @@ -320,11 +326,11 @@ public virtual MachineLearningCodeContainerCollection GetMachineLearningCodeCont /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} /// /// /// Operation Id - /// CodeContainers_Get + /// EnvironmentContainers_Get /// /// /// @@ -333,9 +339,9 @@ public virtual MachineLearningCodeContainerCollection GetMachineLearningCodeCont /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningCodeContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningEnvironmentContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMachineLearningCodeContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningEnvironmentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -343,11 +349,11 @@ public virtual async Task> GetMac /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} /// /// /// Operation Id - /// CodeContainers_Get + /// EnvironmentContainers_Get /// /// /// @@ -356,16 +362,16 @@ public virtual async Task> GetMac /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningCodeContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningEnvironmentContainer(string name, CancellationToken cancellationToken = default) { - return GetMachineLearningCodeContainers().Get(name, cancellationToken); + return GetMachineLearningEnvironmentContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningComponentContainerResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningComponentContainerResources and their operations over a MachineLearningComponentContainerResource. - public virtual MachineLearningComponentContainerCollection GetMachineLearningComponentContainers() + /// Gets a collection of MachineLearningModelContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningModelContainerResources and their operations over a MachineLearningModelContainerResource. + public virtual MachineLearningModelContainerCollection GetMachineLearningModelContainers() { - return GetCachedClient(Client => new MachineLearningComponentContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningModelContainerCollection(Client, Id)); } /// @@ -373,22 +379,22 @@ public virtual MachineLearningComponentContainerCollection GetMachineLearningCom /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} /// /// /// Operation Id - /// ComponentContainers_Get + /// ModelContainers_Get /// /// /// - /// Container name. + /// Container name. This is case-sensitive. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningComponentContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningModelContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMachineLearningComponentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningModelContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -396,75 +402,75 @@ public virtual async Task> G /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} /// /// /// Operation Id - /// ComponentContainers_Get + /// ModelContainers_Get /// /// /// - /// Container name. + /// Container name. This is case-sensitive. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningComponentContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningModelContainer(string name, CancellationToken cancellationToken = default) { - return GetMachineLearningComponentContainers().Get(name, cancellationToken); + return GetMachineLearningModelContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningDataContainerResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningDataContainerResources and their operations over a MachineLearningDataContainerResource. - public virtual MachineLearningDataContainerCollection GetMachineLearningDataContainers() + /// Gets a collection of MachineLearningBatchEndpointResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningBatchEndpointResources and their operations over a MachineLearningBatchEndpointResource. + public virtual MachineLearningBatchEndpointCollection GetMachineLearningBatchEndpoints() { - return GetCachedClient(Client => new MachineLearningDataContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningBatchEndpointCollection(Client, Id)); } /// - /// Get container. + /// Gets a batch inference endpoint by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} /// /// /// Operation Id - /// DataContainers_Get + /// BatchEndpoints_Get /// /// /// - /// Container name. + /// Name for the Batch Endpoint. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningDataContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningBatchEndpointAsync(string endpointName, CancellationToken cancellationToken = default) { - return await GetMachineLearningDataContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningBatchEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); } /// - /// Get container. + /// Gets a batch inference endpoint by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} /// /// /// Operation Id - /// DataContainers_Get + /// BatchEndpoints_Get /// /// /// - /// Container name. + /// Name for the Batch Endpoint. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningDataContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningBatchEndpoint(string endpointName, CancellationToken cancellationToken = default) { - return GetMachineLearningDataContainers().Get(name, cancellationToken); + return GetMachineLearningBatchEndpoints().Get(endpointName, cancellationToken); } /// Gets a collection of MachineLearningDatastoreResources in the MachineLearningWorkspace. @@ -520,11 +526,11 @@ public virtual Response GetMachineLearningData return GetMachineLearningDatastores().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningEnvironmentContainerResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningEnvironmentContainerResources and their operations over a MachineLearningEnvironmentContainerResource. - public virtual MachineLearningEnvironmentContainerCollection GetMachineLearningEnvironmentContainers() + /// Gets a collection of MachineLearningFeatureSetContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningFeatureSetContainerResources and their operations over a MachineLearningFeatureSetContainerResource. + public virtual MachineLearningFeatureSetContainerCollection GetMachineLearningFeatureSetContainers() { - return GetCachedClient(Client => new MachineLearningEnvironmentContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningFeatureSetContainerCollection(Client, Id)); } /// @@ -532,11 +538,11 @@ public virtual MachineLearningEnvironmentContainerCollection GetMachineLearningE /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} /// /// /// Operation Id - /// EnvironmentContainers_Get + /// FeaturesetContainers_GetEntity /// /// /// @@ -545,9 +551,9 @@ public virtual MachineLearningEnvironmentContainerCollection GetMachineLearningE /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningEnvironmentContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningFeatureSetContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMachineLearningEnvironmentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningFeatureSetContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -555,11 +561,11 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name} /// /// /// Operation Id - /// EnvironmentContainers_Get + /// FeaturesetContainers_GetEntity /// /// /// @@ -568,115 +574,172 @@ public virtual async Task> /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningEnvironmentContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningFeatureSetContainer(string name, CancellationToken cancellationToken = default) { - return GetMachineLearningEnvironmentContainers().Get(name, cancellationToken); + return GetMachineLearningFeatureSetContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningJobResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningJobResources and their operations over a MachineLearningJobResource. - public virtual MachineLearningJobCollection GetMachineLearningJobs() + /// Gets a collection of MachineLearningFeatureStoreEntityContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningFeatureStoreEntityContainerResources and their operations over a MachineLearningFeatureStoreEntityContainerResource. + public virtual MachineLearningFeatureStoreEntityContainerCollection GetMachineLearningFeatureStoreEntityContainers() { - return GetCachedClient(Client => new MachineLearningJobCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningFeatureStoreEntityContainerCollection(Client, Id)); } /// - /// Gets a Job by name/id. + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} /// /// /// Operation Id - /// Jobs_Get + /// FeaturestoreEntityContainers_GetEntity /// /// /// - /// The name and identifier for the Job. This is case-sensitive. + /// Container name. This is case-sensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningJobAsync(string id, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningFeatureStoreEntityContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMachineLearningJobs().GetAsync(id, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningFeatureStoreEntityContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// - /// Gets a Job by name/id. + /// Get container. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name} /// /// /// Operation Id - /// Jobs_Get + /// FeaturestoreEntityContainers_GetEntity /// /// /// - /// The name and identifier for the Job. This is case-sensitive. + /// Container name. This is case-sensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningJob(string id, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningFeatureStoreEntityContainer(string name, CancellationToken cancellationToken = default) { - return GetMachineLearningJobs().Get(id, cancellationToken); + return GetMachineLearningFeatureStoreEntityContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningModelContainerResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningModelContainerResources and their operations over a MachineLearningModelContainerResource. - public virtual MachineLearningModelContainerCollection GetMachineLearningModelContainers() + /// Gets a collection of MachineLearningJobResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningJobResources and their operations over a MachineLearningJobResource. + public virtual MachineLearningJobCollection GetMachineLearningJobs() { - return GetCachedClient(Client => new MachineLearningModelContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningJobCollection(Client, Id)); } /// - /// Get container. + /// Gets a Job by name/id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id} /// /// /// Operation Id - /// ModelContainers_Get + /// Jobs_Get /// /// /// - /// Container name. This is case-sensitive. + /// The name and identifier for the Job. This is case-sensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningModelContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningJobAsync(string id, CancellationToken cancellationToken = default) { - return await GetMachineLearningModelContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningJobs().GetAsync(id, cancellationToken).ConfigureAwait(false); } /// - /// Get container. + /// Gets a Job by name/id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id} /// /// /// Operation Id - /// ModelContainers_Get + /// Jobs_Get /// /// /// - /// Container name. This is case-sensitive. + /// The name and identifier for the Job. This is case-sensitive. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetMachineLearningModelContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningJob(string id, CancellationToken cancellationToken = default) { - return GetMachineLearningModelContainers().Get(name, cancellationToken); + return GetMachineLearningJobs().Get(id, cancellationToken); + } + + /// Gets a collection of MachineLearningLabelingJobResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningLabelingJobResources and their operations over a MachineLearningLabelingJobResource. + public virtual MachineLearningLabelingJobCollection GetMachineLearningLabelingJobs() + { + return GetCachedClient(Client => new MachineLearningLabelingJobCollection(Client, Id)); + } + + /// + /// Gets a labeling job by name/id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningLabelingJobAsync(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + return await GetMachineLearningLabelingJobs().GetAsync(id, includeJobInstructions, includeLabelCategories, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a labeling job by name/id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} + /// + /// + /// Operation Id + /// LabelingJobs_Get + /// + /// + /// + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningLabelingJob(string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + return GetMachineLearningLabelingJobs().Get(id, includeJobInstructions, includeLabelCategories, cancellationToken); } /// Gets a collection of MachineLearningOnlineEndpointResources in the MachineLearningWorkspace. @@ -785,6 +848,165 @@ public virtual Response GetMachineLearningSched return GetMachineLearningSchedules().Get(name, cancellationToken); } + /// Gets a collection of MachineLearningWorkspaceConnectionResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningWorkspaceConnectionResources and their operations over a MachineLearningWorkspaceConnectionResource. + public virtual MachineLearningWorkspaceConnectionCollection GetMachineLearningWorkspaceConnections() + { + return GetCachedClient(Client => new MachineLearningWorkspaceConnectionCollection(Client, Id)); + } + + /// + /// Lists machine learning workspaces connections by name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// + /// + /// Operation Id + /// WorkspaceConnections_Get + /// + /// + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningWorkspaceConnectionAsync(string connectionName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningWorkspaceConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Lists machine learning workspaces connections by name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// + /// + /// Operation Id + /// WorkspaceConnections_Get + /// + /// + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningWorkspaceConnection(string connectionName, CancellationToken cancellationToken = default) + { + return GetMachineLearningWorkspaceConnections().Get(connectionName, cancellationToken); + } + + /// Gets a collection of MachineLearningOutboundRuleBasicResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningOutboundRuleBasicResources and their operations over a MachineLearningOutboundRuleBasicResource. + public virtual MachineLearningOutboundRuleBasicCollection GetMachineLearningOutboundRuleBasics() + { + return GetCachedClient(Client => new MachineLearningOutboundRuleBasicCollection(Client, Id)); + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningOutboundRuleBasicAsync(string ruleName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningOutboundRuleBasics().GetAsync(ruleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningOutboundRuleBasic(string ruleName, CancellationToken cancellationToken = default) + { + return GetMachineLearningOutboundRuleBasics().Get(ruleName, cancellationToken); + } + + /// Gets a collection of MachineLearningPrivateEndpointConnectionResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningPrivateEndpointConnectionResources and their operations over a MachineLearningPrivateEndpointConnectionResource. + public virtual MachineLearningPrivateEndpointConnectionCollection GetMachineLearningPrivateEndpointConnections() + { + return GetCachedClient(Client => new MachineLearningPrivateEndpointConnectionCollection(Client, Id)); + } + + /// + /// Called by end-users to get a PE connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// + /// NRP Private Endpoint Connection Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Called by end-users to get a PE connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// + /// NRP Private Endpoint Connection Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + return GetMachineLearningPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); + } + /// /// Gets the properties of the specified machine learning workspace. /// @@ -863,15 +1085,16 @@ public virtual Response Get(CancellationToken /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Flag to indicate delete is a purge request. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? forceToPurge = null, CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Delete"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _machineLearningWorkspaceWorkspacesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -897,15 +1120,16 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Flag to indicate delete is a purge request. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceToPurge = null, CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Delete"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _machineLearningWorkspaceWorkspacesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -993,6 +1217,50 @@ public virtual ArmOperation Update(WaitUntil w } } + /// + /// Lists all enabled features for a workspace + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features + /// + /// + /// Operation Id + /// WorkspaceFeatures_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetWorkspaceFeaturesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, MachineLearningUserFeature.DeserializeMachineLearningUserFeature, _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all enabled features for a workspace + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features + /// + /// + /// Operation Id + /// WorkspaceFeatures_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetWorkspaceFeatures(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, MachineLearningUserFeature.DeserializeMachineLearningUserFeature, _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); + } + /// /// Diagnose workspace setup issue. /// @@ -1064,7 +1332,7 @@ public virtual ArmOperation Diagnose(Wai } /// - /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. /// /// /// Request Path @@ -1094,7 +1362,7 @@ public virtual async Task> GetKe } /// - /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. /// /// /// Request Path @@ -1124,31 +1392,27 @@ public virtual Response GetKeys(Cancellat } /// - /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken /// /// /// Operation Id - /// Workspaces_ResyncKeys + /// Workspaces_ListNotebookAccessToken /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task ResyncKeysAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> GetNotebookAccessTokenAsync(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ResyncKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessTokenAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1158,31 +1422,27 @@ public virtual async Task ResyncKeysAsync(WaitUntil waitUntil, Can } /// - /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken /// /// /// Operation Id - /// Workspaces_ResyncKeys + /// Workspaces_ListNotebookAccessToken /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation ResyncKeys(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual Response GetNotebookAccessToken(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.ResyncKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessToken(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; } catch (Exception e) { @@ -1192,26 +1452,26 @@ public virtual ArmOperation ResyncKeys(WaitUntil waitUntil, CancellationToken ca } /// - /// return notebook access token and refresh token + /// Lists keys of Azure Machine Learning Workspaces notebook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys /// /// /// Operation Id - /// Workspaces_ListNotebookAccessToken + /// Workspaces_ListNotebookKeys /// /// /// /// The cancellation token to use. - public virtual async Task> GetNotebookAccessTokenAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetNotebookKeysAsync(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessTokenAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -1222,26 +1482,26 @@ public virtual async Task - /// return notebook access token and refresh token + /// Lists keys of Azure Machine Learning Workspaces notebook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys /// /// /// Operation Id - /// Workspaces_ListNotebookAccessToken + /// Workspaces_ListNotebookKeys /// /// /// /// The cancellation token to use. - public virtual Response GetNotebookAccessToken(CancellationToken cancellationToken = default) + public virtual Response GetNotebookKeys(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessToken(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -1252,31 +1512,27 @@ public virtual Response GetNo } /// - /// Prepare a notebook. + /// Lists keys of Azure Machine Learning Workspace's storage account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys /// /// /// Operation Id - /// Workspaces_PrepareNotebook + /// Workspaces_ListStorageAccountKeys /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> PrepareNotebookAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> GetStorageAccountKeysAsync(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.PrepareNotebook"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.PrepareNotebookAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningNotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1286,31 +1542,27 @@ public virtual async Task> Pre } /// - /// Prepare a notebook. + /// Lists keys of Azure Machine Learning Workspace's storage account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys /// /// /// Operation Id - /// Workspaces_PrepareNotebook + /// Workspaces_ListStorageAccountKeys /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation PrepareNotebook(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual Response GetStorageAccountKeys(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.PrepareNotebook"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.PrepareNotebook(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningNotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; } catch (Exception e) { @@ -1320,87 +1572,73 @@ public virtual ArmOperation PrepareNotebook } /// - /// List storage account keys of a workspace. + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// Workspaces_ListStorageAccountKeys + /// Workspaces_ListOutboundNetworkDependenciesEndpoints /// /// /// /// The cancellation token to use. - public virtual async Task> GetStorageAccountKeysAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); - scope.Start(); - try - { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints, _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); } /// - /// List storage account keys of a workspace. + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// Workspaces_ListStorageAccountKeys + /// Workspaces_ListOutboundNetworkDependenciesEndpoints /// /// /// /// The cancellation token to use. - public virtual Response GetStorageAccountKeys(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); - scope.Start(); - try - { - var response = _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints, _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); } /// - /// List keys of a notebook. + /// Prepare Azure Machine Learning Workspace's notebook resource /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook /// /// /// Operation Id - /// Workspaces_ListNotebookKeys + /// Workspaces_PrepareNotebook /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> GetNotebookKeysAsync(CancellationToken cancellationToken = default) + public virtual async Task> PrepareNotebookAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.PrepareNotebook"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var response = await _machineLearningWorkspaceWorkspacesRestClient.PrepareNotebookAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningNotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1410,27 +1648,31 @@ public virtual async Task - /// List keys of a notebook. + /// Prepare Azure Machine Learning Workspace's notebook resource /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook /// /// /// Operation Id - /// Workspaces_ListNotebookKeys + /// Workspaces_PrepareNotebook /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual Response GetNotebookKeys(CancellationToken cancellationToken = default) + public virtual ArmOperation PrepareNotebook(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.PrepareNotebook"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; + var response = _machineLearningWorkspaceWorkspacesRestClient.PrepareNotebook(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningNotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -1440,49 +1682,79 @@ public virtual Response GetNotebo } /// - /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys /// /// /// Operation Id - /// Workspaces_ListOutboundNetworkDependenciesEndpoints + /// Workspaces_ResyncKeys /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(CancellationToken cancellationToken = default) + public virtual async Task ResyncKeysAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints, _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceWorkspacesRestClient.ResyncKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// 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 /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys /// /// /// Operation Id - /// Workspaces_ListOutboundNetworkDependenciesEndpoints + /// Workspaces_ResyncKeys /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) + public virtual ArmOperation ResyncKeys(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints, _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceWorkspacesRestClient.ResyncKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// 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". /// /// /// Request Path @@ -1503,7 +1775,11 @@ public virtual AsyncPageable GetPrivateLinkR } /// - /// 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". /// /// /// Request Path @@ -1524,47 +1800,73 @@ public virtual Pageable GetPrivateLinkResour } /// - /// Lists all enabled features for a workspace + /// Provisions the managed network of a machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork /// /// /// Operation Id - /// WorkspaceFeatures_List + /// ManagedNetworkProvisions_ProvisionManagedNetwork /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Managed Network Provisioning Options for a machine learning workspace. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetWorkspaceFeaturesAsync(CancellationToken cancellationToken = default) + public virtual async Task> ProvisionManagedNetworkManagedNetworkProvisionAsync(WaitUntil waitUntil, ManagedNetworkProvisionContent content = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, MachineLearningUserFeature.DeserializeMachineLearningUserFeature, _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); + using var scope = _managedNetworkProvisionsClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ProvisionManagedNetworkManagedNetworkProvision"); + scope.Start(); + try + { + var response = await _managedNetworkProvisionsRestClient.ProvisionManagedNetworkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new ManagedNetworkProvisionStatusOperationSource(), _managedNetworkProvisionsClientDiagnostics, Pipeline, _managedNetworkProvisionsRestClient.CreateProvisionManagedNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Lists all enabled features for a workspace + /// Provisions the managed network of a machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork /// /// /// Operation Id - /// WorkspaceFeatures_List + /// ManagedNetworkProvisions_ProvisionManagedNetwork /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Managed Network Provisioning Options for a machine learning workspace. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetWorkspaceFeatures(CancellationToken cancellationToken = default) + public virtual ArmOperation ProvisionManagedNetworkManagedNetworkProvision(WaitUntil waitUntil, ManagedNetworkProvisionContent content = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, MachineLearningUserFeature.DeserializeMachineLearningUserFeature, _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); + using var scope = _managedNetworkProvisionsClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ProvisionManagedNetworkManagedNetworkProvision"); + scope.Start(); + try + { + var response = _managedNetworkProvisionsRestClient.ProvisionManagedNetwork(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new MachineLearningArmOperation(new ManagedNetworkProvisionStatusOperationSource(), _managedNetworkProvisionsClientDiagnostics, Pipeline, _managedNetworkProvisionsRestClient.CreateProvisionManagedNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs new file mode 100644 index 0000000000000..b6a17afce8184 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AccessKeyAuthTypeWorkspaceConnectionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(ExpiryOn)) + { + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + writer.WriteEndObject(); + } + + internal static AccessKeyAuthTypeWorkspaceConnectionProperties DeserializeAccessKeyAuthTypeWorkspaceConnectionProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional expiryTime = default; + Optional metadata = default; + Optional target = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credentials = WorkspaceConnectionAccessKey.DeserializeWorkspaceConnectionAccessKey(property.Value); + continue; + } + if (property.NameEquals("authType"u8)) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("expiryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + } + return new AccessKeyAuthTypeWorkspaceConnectionProperties(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs new file mode 100644 index 0000000000000..452f2e6231f0e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The AccessKeyAuthTypeWorkspaceConnectionProperties. + public partial class AccessKeyAuthTypeWorkspaceConnectionProperties : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of AccessKeyAuthTypeWorkspaceConnectionProperties. + public AccessKeyAuthTypeWorkspaceConnectionProperties() + { + AuthType = MachineLearningConnectionAuthType.AccessKey; + } + + /// Initializes a new instance of AccessKeyAuthTypeWorkspaceConnectionProperties. + /// Authentication type of the connection target. + /// Category of the connection. + /// + /// Any object. + /// + /// + internal AccessKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, WorkspaceConnectionAccessKey credentials) : base(authType, category, expiryOn, metadata, target) + { + Credentials = credentials; + AuthType = authType; + } + + /// Gets or sets the credentials. + public WorkspaceConnectionAccessKey Credentials { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.Serialization.cs new file mode 100644 index 0000000000000..e1326a7d5d84a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AmlTokenComputeIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeIdentityType"u8); + writer.WriteStringValue(ComputeIdentityType.ToString()); + writer.WriteEndObject(); + } + + internal static AmlTokenComputeIdentity DeserializeAmlTokenComputeIdentity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitorComputeIdentityType computeIdentityType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeIdentityType"u8)) + { + computeIdentityType = new MonitorComputeIdentityType(property.Value.GetString()); + continue; + } + } + return new AmlTokenComputeIdentity(computeIdentityType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.cs new file mode 100644 index 0000000000000..084d82326a83d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlTokenComputeIdentity.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// AML token compute identity definition. + public partial class AmlTokenComputeIdentity : MonitorComputeIdentityBase + { + /// Initializes a new instance of AmlTokenComputeIdentity. + public AmlTokenComputeIdentity() + { + ComputeIdentityType = MonitorComputeIdentityType.AmlToken; + } + + /// Initializes a new instance of AmlTokenComputeIdentity. + /// [Required] Monitor compute identity type enum. + internal AmlTokenComputeIdentity(MonitorComputeIdentityType computeIdentityType) : base(computeIdentityType) + { + ComputeIdentityType = computeIdentityType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs new file mode 100644 index 0000000000000..db917f3158708 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ApiKeyAuthWorkspaceConnectionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(ExpiryOn)) + { + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + writer.WriteEndObject(); + } + + internal static ApiKeyAuthWorkspaceConnectionProperties DeserializeApiKeyAuthWorkspaceConnectionProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional expiryTime = default; + Optional metadata = default; + Optional target = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credentials = WorkspaceConnectionApiKey.DeserializeWorkspaceConnectionApiKey(property.Value); + continue; + } + if (property.NameEquals("authType"u8)) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("expiryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + } + return new ApiKeyAuthWorkspaceConnectionProperties(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs new file mode 100644 index 0000000000000..dac0d3fd324fa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// This connection type covers the generic ApiKey auth connection categories, for examples: + /// AzureOpenAI: + /// Category:= AzureOpenAI + /// AuthType:= ApiKey (as type discriminator) + /// Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + /// Target:= {ApiBase} + /// + /// CognitiveService: + /// Category:= CognitiveService + /// AuthType:= ApiKey (as type discriminator) + /// Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + /// Target:= ServiceRegion={serviceRegion} + /// + /// CognitiveSearch: + /// Category:= CognitiveSearch + /// AuthType:= ApiKey (as type discriminator) + /// Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + /// Target:= {Endpoint} + /// + /// Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields + /// + public partial class ApiKeyAuthWorkspaceConnectionProperties : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of ApiKeyAuthWorkspaceConnectionProperties. + public ApiKeyAuthWorkspaceConnectionProperties() + { + AuthType = MachineLearningConnectionAuthType.ApiKey; + } + + /// Initializes a new instance of ApiKeyAuthWorkspaceConnectionProperties. + /// Authentication type of the connection target. + /// Category of the connection. + /// + /// Any object. + /// + /// Api key object for workspace connection credential. + internal ApiKeyAuthWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, WorkspaceConnectionApiKey credentials) : base(authType, category, expiryOn, metadata, target) + { + Credentials = credentials; + AuthType = authType; + } + + /// Api key object for workspace connection credential. + internal WorkspaceConnectionApiKey Credentials { get; set; } + /// Gets or sets the credentials key. + public string CredentialsKey + { + get => Credentials is null ? default : Credentials.Key; + set + { + if (Credentials is null) + Credentials = new WorkspaceConnectionApiKey(); + Credentials.Key = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.Serialization.cs new file mode 100644 index 0000000000000..595662ffbc75c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class ArmResourceId : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + writer.WriteEndObject(); + } + + internal static ArmResourceId DeserializeArmResourceId(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new ArmResourceId(resourceId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.cs new file mode 100644 index 0000000000000..3518d9c61b3d1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ArmResourceId.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// ARM ResourceId of a resource. + internal partial class ArmResourceId + { + /// Initializes a new instance of ArmResourceId. + public ArmResourceId() + { + } + + /// Initializes a new instance of ArmResourceId. + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + internal ArmResourceId(ResourceIdentifier resourceId) + { + ResourceId = resourceId; + } + + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteCondition.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteCondition.cs new file mode 100644 index 0000000000000..5ee64c0f5cab0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteCondition.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The AutoDeleteCondition. + public readonly partial struct AutoDeleteCondition : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoDeleteCondition(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedGreaterThanValue = "CreatedGreaterThan"; + private const string LastAccessedGreaterThanValue = "LastAccessedGreaterThan"; + + /// CreatedGreaterThan. + public static AutoDeleteCondition CreatedGreaterThan { get; } = new AutoDeleteCondition(CreatedGreaterThanValue); + /// LastAccessedGreaterThan. + public static AutoDeleteCondition LastAccessedGreaterThan { get; } = new AutoDeleteCondition(LastAccessedGreaterThanValue); + /// Determines if two values are the same. + public static bool operator ==(AutoDeleteCondition left, AutoDeleteCondition right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoDeleteCondition left, AutoDeleteCondition right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AutoDeleteCondition(string value) => new AutoDeleteCondition(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoDeleteCondition other && Equals(other); + /// + public bool Equals(AutoDeleteCondition other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.Serialization.cs new file mode 100644 index 0000000000000..ba81a2ea01025 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AutoDeleteSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Condition)) + { + writer.WritePropertyName("condition"u8); + writer.WriteStringValue(Condition.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + if (Value != null) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + else + { + writer.WriteNull("value"); + } + } + writer.WriteEndObject(); + } + + internal static AutoDeleteSetting DeserializeAutoDeleteSetting(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional condition = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("condition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + condition = new AutoDeleteCondition(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + value = null; + continue; + } + value = property.Value.GetString(); + continue; + } + } + return new AutoDeleteSetting(Optional.ToNullable(condition), value.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.cs new file mode 100644 index 0000000000000..469a12683b9f6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoDeleteSetting.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The AutoDeleteSetting. + public partial class AutoDeleteSetting + { + /// Initializes a new instance of AutoDeleteSetting. + public AutoDeleteSetting() + { + } + + /// Initializes a new instance of AutoDeleteSetting. + /// When to check if an asset is expired. + /// Expiration condition value. + internal AutoDeleteSetting(AutoDeleteCondition? condition, string value) + { + Condition = condition; + Value = value; + } + + /// When to check if an asset is expired. + public AutoDeleteCondition? Condition { get; set; } + /// Expiration condition value. + public string Value { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs index 961c7d54c2f3a..08a48896e15b2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs @@ -64,6 +64,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("outputs"); } } + if (Optional.IsDefined(QueueSettings)) + { + if (QueueSettings != null) + { + writer.WritePropertyName("queueSettings"u8); + writer.WriteObjectValue(QueueSettings); + } + else + { + writer.WriteNull("queueSettings"); + } + } if (Optional.IsDefined(Resources)) { writer.WritePropertyName("resources"u8); @@ -131,6 +143,36 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("jobType"u8); writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + if (Optional.IsCollectionDefined(SecretsConfiguration)) + { + if (SecretsConfiguration != null) + { + writer.WritePropertyName("secretsConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SecretsConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secretsConfiguration"); + } + } if (Optional.IsCollectionDefined(Services)) { if (Services != null) @@ -209,6 +251,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) Optional environmentId = default; Optional> environmentVariables = default; Optional> outputs = default; + Optional queueSettings = default; Optional resources = default; AutoMLVertical taskDetails = default; Optional componentId = default; @@ -218,6 +261,8 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) Optional identity = default; Optional isArchived = default; JobType jobType = default; + Optional notificationSetting = default; + Optional> secretsConfiguration = default; Optional> services = default; Optional status = default; Optional description = default; @@ -265,6 +310,16 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) outputs = dictionary; continue; } + if (property.NameEquals("queueSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + queueSettings = null; + continue; + } + queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value); + continue; + } if (property.NameEquals("resources"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -338,6 +393,31 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) jobType = new JobType(property.Value.GetString()); continue; } + if (property.NameEquals("notificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notificationSetting = null; + continue; + } + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("secretsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secretsConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SecretConfiguration.DeserializeSecretConfiguration(property0.Value)); + } + secretsConfiguration = dictionary; + continue; + } if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -403,7 +483,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) continue; } } - return new AutoMLJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(outputs), resources.Value, taskDetails); + return new AutoMLJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, notificationSetting.Value, Optional.ToDictionary(secretsConfiguration), Optional.ToDictionary(services), Optional.ToNullable(status), environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(outputs), queueSettings.Value, resources.Value, taskDetails); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs index 7a6452155a739..67a456c991b6e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs @@ -51,6 +51,8 @@ public AutoMLJob(AutoMLVertical taskDetails) /// /// Is the asset archived?. /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. @@ -66,17 +68,19 @@ public AutoMLJob(AutoMLVertical taskDetails) /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// + /// Queue settings for the job. /// Compute Resource configuration for the job. /// /// [Required] This represents scenario which can be one of Tables/NLP/Image /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , , , , and . /// - internal AutoMLJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, string environmentId, IDictionary environmentVariables, IDictionary outputs, MachineLearningJobResourceConfiguration resources, AutoMLVertical taskDetails) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + internal AutoMLJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary secretsConfiguration, IDictionary services, MachineLearningJobStatus? status, string environmentId, IDictionary environmentVariables, IDictionary outputs, JobQueueSettings queueSettings, MachineLearningJobResourceConfiguration resources, AutoMLVertical taskDetails) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, secretsConfiguration, services, status) { EnvironmentId = environmentId; EnvironmentVariables = environmentVariables; Outputs = outputs; + QueueSettings = queueSettings; Resources = resources; TaskDetails = taskDetails; JobType = jobType; @@ -95,6 +99,8 @@ internal AutoMLJob(string description, IDictionary properties, I /// The available derived classes include , , , , and . /// public IDictionary Outputs { get; set; } + /// Queue settings for the job. + public JobQueueSettings QueueSettings { get; set; } /// Compute Resource configuration for the job. public MachineLearningJobResourceConfiguration Resources { get; set; } /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs index 12f84276c3c69..c414b5ede1062 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs @@ -62,6 +62,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("featurizationSettings"); } } + if (Optional.IsDefined(FixedParameters)) + { + if (FixedParameters != null) + { + writer.WritePropertyName("fixedParameters"u8); + writer.WriteObjectValue(FixedParameters); + } + else + { + writer.WriteNull("fixedParameters"); + } + } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -86,6 +98,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("nCrossValidations"); } } + if (Optional.IsCollectionDefined(SearchSpace)) + { + if (SearchSpace != null) + { + writer.WritePropertyName("searchSpace"u8); + writer.WriteStartArray(); + foreach (var item in SearchSpace) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("searchSpace"); + } + } + if (Optional.IsDefined(SweepSettings)) + { + if (SweepSettings != null) + { + writer.WritePropertyName("sweepSettings"u8); + writer.WriteObjectValue(SweepSettings); + } + else + { + writer.WriteNull("sweepSettings"); + } + } if (Optional.IsDefined(TestData)) { if (TestData != null) @@ -180,8 +221,11 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso Optional trainingSettings = default; Optional> cvSplitColumnNames = default; Optional featurizationSettings = default; + Optional fixedParameters = default; Optional limitSettings = default; Optional nCrossValidations = default; + Optional> searchSpace = default; + Optional sweepSettings = default; Optional testData = default; Optional testDataSize = default; Optional validationData = default; @@ -237,6 +281,16 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value); continue; } + if (property.NameEquals("fixedParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fixedParameters = null; + continue; + } + fixedParameters = TableFixedParameters.DeserializeTableFixedParameters(property.Value); + continue; + } if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -257,6 +311,31 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value); continue; } + if (property.NameEquals("searchSpace"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchSpace = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TableParameterSubspace.DeserializeTableParameterSubspace(item)); + } + searchSpace = array; + continue; + } + if (property.NameEquals("sweepSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sweepSettings = null; + continue; + } + sweepSettings = TableSweepSettings.DeserializeTableSweepSettings(property.Value); + continue; + } if (property.NameEquals("testData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -337,7 +416,7 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso continue; } } - return new AutoMLVerticalRegression(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, limitSettings.Value, nCrossValidations.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); + return new AutoMLVerticalRegression(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, fixedParameters.Value, limitSettings.Value, nCrossValidations.Value, Optional.ToList(searchSpace), sweepSettings.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs index bf277ea1c20f0..0745dd9ec799f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs @@ -22,6 +22,7 @@ public AutoMLVerticalRegression(MachineLearningTableJobInput trainingData) : bas Argument.AssertNotNull(trainingData, nameof(trainingData)); CvSplitColumnNames = new ChangeTrackingList(); + SearchSpace = new ChangeTrackingList(); TaskType = TaskType.Regression; } @@ -37,6 +38,7 @@ public AutoMLVerticalRegression(MachineLearningTableJobInput trainingData) : bas /// Inputs for training phase for an AutoML Job. /// Columns to use for CVSplit data. /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. /// /// Number of cross validation folds to be applied on training dataset @@ -44,6 +46,8 @@ public AutoMLVerticalRegression(MachineLearningTableJobInput trainingData) : bas /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Test data input. /// /// The fraction of test dataset that needs to be set aside for validation purpose. @@ -57,14 +61,17 @@ public AutoMLVerticalRegression(MachineLearningTableJobInput trainingData) : bas /// Applied when validation dataset is not provided. /// /// 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. - internal AutoMLVerticalRegression(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, AutoMLVerticalRegressionPrimaryMetric? primaryMetric, RegressionTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal AutoMLVerticalRegression(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, AutoMLVerticalRegressionPrimaryMetric? primaryMetric, RegressionTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableFixedParameters fixedParameters, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, IList searchSpace, TableSweepSettings sweepSettings, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; TrainingSettings = trainingSettings; CvSplitColumnNames = cvSplitColumnNames; FeaturizationSettings = featurizationSettings; + FixedParameters = fixedParameters; LimitSettings = limitSettings; NCrossValidations = nCrossValidations; + SearchSpace = searchSpace; + SweepSettings = sweepSettings; TestData = testData; TestDataSize = testDataSize; ValidationData = validationData; @@ -81,6 +88,8 @@ internal AutoMLVerticalRegression(MachineLearningLogVerbosity? logVerbosity, str public IList CvSplitColumnNames { get; set; } /// Featurization inputs needed for AutoML job. public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } + /// Model/training parameters that will remain constant throughout training. + public TableFixedParameters FixedParameters { get; set; } /// Execution constraints for AutoMLJob. public TableVerticalLimitSettings LimitSettings { get; set; } /// @@ -90,6 +99,10 @@ internal AutoMLVerticalRegression(MachineLearningLogVerbosity? logVerbosity, str /// The available derived classes include and . /// public NCrossValidations NCrossValidations { get; set; } + /// Search space for sampling different combinations of models and their hyperparameters. + public IList SearchSpace { get; set; } + /// Settings for model sweeping and hyperparameter tuning. + public TableSweepSettings SweepSettings { get; set; } /// Test data input. public MachineLearningTableJobInput TestData { get; set; } /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionModel.cs index 617270cdacc7f..3e141a38e0c04 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionModel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionModel.cs @@ -57,7 +57,7 @@ public AutoMLVerticalRegressionModel(string value) public static AutoMLVerticalRegressionModel SGD { get; } = new AutoMLVerticalRegressionModel(SGDValue); /// /// Random forest is a supervised learning algorithm. - /// The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. + /// The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. /// The general idea of the bagging method is that a combination of learning models increases the overall result. /// public static AutoMLVerticalRegressionModel RandomForest { get; } = new AutoMLVerticalRegressionModel(RandomForestValue); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.Serialization.cs new file mode 100644 index 0000000000000..d73ae515920fd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class AutologgerSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mlflowAutologger"u8); + writer.WriteStringValue(MlflowAutologger.ToString()); + writer.WriteEndObject(); + } + + internal static AutologgerSettings DeserializeAutologgerSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MachineLearningFlowAutoLoggerState mlflowAutologger = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mlflowAutologger"u8)) + { + mlflowAutologger = new MachineLearningFlowAutoLoggerState(property.Value.GetString()); + continue; + } + } + return new AutologgerSettings(mlflowAutologger); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.cs new file mode 100644 index 0000000000000..f84c14542af9a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutologgerSettings.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Settings for Autologger. + internal partial class AutologgerSettings + { + /// Initializes a new instance of AutologgerSettings. + /// [Required] Indicates whether mlflow autologger is enabled. + public AutologgerSettings(MachineLearningFlowAutoLoggerState mlflowAutologger) + { + MlflowAutologger = mlflowAutologger; + } + + /// [Required] Indicates whether mlflow autologger is enabled. + public MachineLearningFlowAutoLoggerState MlflowAutologger { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.Serialization.cs new file mode 100644 index 0000000000000..8f5c9aba5ea0b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AzMonMonitoringAlertNotificationSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("alertNotificationType"u8); + writer.WriteStringValue(AlertNotificationType.ToString()); + writer.WriteEndObject(); + } + + internal static AzMonMonitoringAlertNotificationSettings DeserializeAzMonMonitoringAlertNotificationSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringAlertNotificationType alertNotificationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alertNotificationType"u8)) + { + alertNotificationType = new MonitoringAlertNotificationType(property.Value.GetString()); + continue; + } + } + return new AzMonMonitoringAlertNotificationSettings(alertNotificationType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.cs new file mode 100644 index 0000000000000..7e7261eef039d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzMonMonitoringAlertNotificationSettings.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The AzMonMonitoringAlertNotificationSettings. + public partial class AzMonMonitoringAlertNotificationSettings : MonitoringAlertNotificationSettingsBase + { + /// Initializes a new instance of AzMonMonitoringAlertNotificationSettings. + public AzMonMonitoringAlertNotificationSettings() + { + AlertNotificationType = MonitoringAlertNotificationType.AzureMonitor; + } + + /// Initializes a new instance of AzMonMonitoringAlertNotificationSettings. + /// [Required] Specifies the type of signal to monitor. + internal AzMonMonitoringAlertNotificationSettings(MonitoringAlertNotificationType alertNotificationType) : base(alertNotificationType) + { + AlertNotificationType = alertNotificationType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs new file mode 100644 index 0000000000000..a0b02d9d8e62c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AzureDevOpsWebhook : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventType)) + { + if (EventType != null) + { + writer.WritePropertyName("eventType"u8); + writer.WriteStringValue(EventType); + } + else + { + writer.WriteNull("eventType"); + } + } + writer.WritePropertyName("webhookType"u8); + writer.WriteStringValue(WebhookType.ToString()); + writer.WriteEndObject(); + } + + internal static AzureDevOpsWebhook DeserializeAzureDevOpsWebhook(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional eventType = default; + MachineLearningWebhookType webhookType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + eventType = null; + continue; + } + eventType = property.Value.GetString(); + continue; + } + if (property.NameEquals("webhookType"u8)) + { + webhookType = new MachineLearningWebhookType(property.Value.GetString()); + continue; + } + } + return new AzureDevOpsWebhook(eventType.Value, webhookType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs new file mode 100644 index 0000000000000..be6a7962a15a0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Webhook details specific for Azure DevOps. + public partial class AzureDevOpsWebhook : MachineLearningWebhook + { + /// Initializes a new instance of AzureDevOpsWebhook. + public AzureDevOpsWebhook() + { + WebhookType = MachineLearningWebhookType.AzureDevOps; + } + + /// Initializes a new instance of AzureDevOpsWebhook. + /// Send callback on a specified notification event. + /// [Required] Specifies the type of service to send a callback. + internal AzureDevOpsWebhook(string eventType, MachineLearningWebhookType webhookType) : base(eventType, webhookType) + { + WebhookType = webhookType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.Serialization.cs new file mode 100644 index 0000000000000..e5462f617acb1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AzureMLBatchInferencingServer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration); + } + else + { + writer.WriteNull("codeConfiguration"); + } + } + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType.ToString()); + writer.WriteEndObject(); + } + + internal static AzureMLBatchInferencingServer DeserializeAzureMLBatchInferencingServer(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional codeConfiguration = default; + InferencingServerType serverType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeConfiguration = null; + continue; + } + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("serverType"u8)) + { + serverType = new InferencingServerType(property.Value.GetString()); + continue; + } + } + return new AzureMLBatchInferencingServer(serverType, codeConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.cs new file mode 100644 index 0000000000000..f6b647007eb2b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLBatchInferencingServer.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Azure ML batch inferencing server configurations. + public partial class AzureMLBatchInferencingServer : InferencingServer + { + /// Initializes a new instance of AzureMLBatchInferencingServer. + public AzureMLBatchInferencingServer() + { + ServerType = InferencingServerType.AzureMLBatch; + } + + /// Initializes a new instance of AzureMLBatchInferencingServer. + /// [Required] Inferencing server type for various targets. + /// Code configuration for AML batch inferencing server. + internal AzureMLBatchInferencingServer(InferencingServerType serverType, MachineLearningCodeConfiguration codeConfiguration) : base(serverType) + { + CodeConfiguration = codeConfiguration; + ServerType = serverType; + } + + /// Code configuration for AML batch inferencing server. + public MachineLearningCodeConfiguration CodeConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.Serialization.cs new file mode 100644 index 0000000000000..ee58999ff8567 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AzureMLOnlineInferencingServer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration); + } + else + { + writer.WriteNull("codeConfiguration"); + } + } + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType.ToString()); + writer.WriteEndObject(); + } + + internal static AzureMLOnlineInferencingServer DeserializeAzureMLOnlineInferencingServer(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional codeConfiguration = default; + InferencingServerType serverType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeConfiguration = null; + continue; + } + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("serverType"u8)) + { + serverType = new InferencingServerType(property.Value.GetString()); + continue; + } + } + return new AzureMLOnlineInferencingServer(serverType, codeConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.cs new file mode 100644 index 0000000000000..e9a236afc4a0f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureMLOnlineInferencingServer.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Azure ML online inferencing configurations. + public partial class AzureMLOnlineInferencingServer : InferencingServer + { + /// Initializes a new instance of AzureMLOnlineInferencingServer. + public AzureMLOnlineInferencingServer() + { + ServerType = InferencingServerType.AzureMLOnline; + } + + /// Initializes a new instance of AzureMLOnlineInferencingServer. + /// [Required] Inferencing server type for various targets. + /// Code configuration for AML inferencing server. + internal AzureMLOnlineInferencingServer(InferencingServerType serverType, MachineLearningCodeConfiguration codeConfiguration) : base(serverType) + { + CodeConfiguration = codeConfiguration; + ServerType = serverType; + } + + /// Code configuration for AML inferencing server. + public MachineLearningCodeConfiguration CodeConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.Serialization.cs new file mode 100644 index 0000000000000..da4d6c0207562 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class BaseEnvironmentSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("baseEnvironmentSourceType"u8); + writer.WriteStringValue(BaseEnvironmentSourceType.ToString()); + writer.WriteEndObject(); + } + + internal static BaseEnvironmentSource DeserializeBaseEnvironmentSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("baseEnvironmentSourceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "EnvironmentAsset": return BaseEnvironmentType.DeserializeBaseEnvironmentType(element); + } + } + return UnknownBaseEnvironmentSource.DeserializeUnknownBaseEnvironmentSource(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.cs new file mode 100644 index 0000000000000..6499d819c0802 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSource.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The BaseEnvironmentSource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class BaseEnvironmentSource + { + /// Initializes a new instance of BaseEnvironmentSource. + protected BaseEnvironmentSource() + { + } + + /// Initializes a new instance of BaseEnvironmentSource. + /// [Required] Base environment type. + internal BaseEnvironmentSource(BaseEnvironmentSourceType baseEnvironmentSourceType) + { + BaseEnvironmentSourceType = baseEnvironmentSourceType; + } + + /// [Required] Base environment type. + internal BaseEnvironmentSourceType BaseEnvironmentSourceType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSourceType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSourceType.cs new file mode 100644 index 0000000000000..4e90202e8f458 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentSourceType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Base environment type. + internal readonly partial struct BaseEnvironmentSourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BaseEnvironmentSourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnvironmentAssetValue = "EnvironmentAsset"; + + /// EnvironmentAsset. + public static BaseEnvironmentSourceType EnvironmentAsset { get; } = new BaseEnvironmentSourceType(EnvironmentAssetValue); + /// Determines if two values are the same. + public static bool operator ==(BaseEnvironmentSourceType left, BaseEnvironmentSourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BaseEnvironmentSourceType left, BaseEnvironmentSourceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BaseEnvironmentSourceType(string value) => new BaseEnvironmentSourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BaseEnvironmentSourceType other && Equals(other); + /// + public bool Equals(BaseEnvironmentSourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.Serialization.cs new file mode 100644 index 0000000000000..8206968347d8a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class BaseEnvironmentType : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + writer.WritePropertyName("baseEnvironmentSourceType"u8); + writer.WriteStringValue(BaseEnvironmentSourceType.ToString()); + writer.WriteEndObject(); + } + + internal static BaseEnvironmentType DeserializeBaseEnvironmentType(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + BaseEnvironmentSourceType baseEnvironmentSourceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("baseEnvironmentSourceType"u8)) + { + baseEnvironmentSourceType = new BaseEnvironmentSourceType(property.Value.GetString()); + continue; + } + } + return new BaseEnvironmentType(baseEnvironmentSourceType, resourceId); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.cs new file mode 100644 index 0000000000000..82d3b04831ef8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BaseEnvironmentType.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Base environment type. + public partial class BaseEnvironmentType : BaseEnvironmentSource + { + /// Initializes a new instance of BaseEnvironmentType. + /// [Required] Resource id accepting ArmId or AzureMlId. + /// is null. + public BaseEnvironmentType(ResourceIdentifier resourceId) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + BaseEnvironmentSourceType = BaseEnvironmentSourceType.EnvironmentAsset; + } + + /// Initializes a new instance of BaseEnvironmentType. + /// [Required] Base environment type. + /// [Required] Resource id accepting ArmId or AzureMlId. + internal BaseEnvironmentType(BaseEnvironmentSourceType baseEnvironmentSourceType, ResourceIdentifier resourceId) : base(baseEnvironmentSourceType) + { + ResourceId = resourceId; + BaseEnvironmentSourceType = baseEnvironmentSourceType; + } + + /// [Required] Resource id accepting ArmId or AzureMlId. + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.Serialization.cs new file mode 100644 index 0000000000000..ab0d56a43ab18 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class BatchDeploymentConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("deploymentConfigurationType"u8); + writer.WriteStringValue(DeploymentConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static BatchDeploymentConfiguration DeserializeBatchDeploymentConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("deploymentConfigurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "PipelineComponent": return BatchPipelineComponentDeploymentConfiguration.DeserializeBatchPipelineComponentDeploymentConfiguration(element); + } + } + return UnknownBatchDeploymentConfiguration.DeserializeUnknownBatchDeploymentConfiguration(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.cs new file mode 100644 index 0000000000000..0fd9f75c7087c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Properties relevant to different deployment types. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class BatchDeploymentConfiguration + { + /// Initializes a new instance of BatchDeploymentConfiguration. + protected BatchDeploymentConfiguration() + { + } + + /// Initializes a new instance of BatchDeploymentConfiguration. + /// [Required] The type of the deployment. + internal BatchDeploymentConfiguration(BatchDeploymentConfigurationType deploymentConfigurationType) + { + DeploymentConfigurationType = deploymentConfigurationType; + } + + /// [Required] The type of the deployment. + internal BatchDeploymentConfigurationType DeploymentConfigurationType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfigurationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfigurationType.cs new file mode 100644 index 0000000000000..c8850165329c4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentConfigurationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The enumerated property types for batch deployments. + internal readonly partial struct BatchDeploymentConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchDeploymentConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ModelValue = "Model"; + private const string PipelineComponentValue = "PipelineComponent"; + + /// Model. + public static BatchDeploymentConfigurationType Model { get; } = new BatchDeploymentConfigurationType(ModelValue); + /// PipelineComponent. + public static BatchDeploymentConfigurationType PipelineComponent { get; } = new BatchDeploymentConfigurationType(PipelineComponentValue); + /// Determines if two values are the same. + public static bool operator ==(BatchDeploymentConfigurationType left, BatchDeploymentConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchDeploymentConfigurationType left, BatchDeploymentConfigurationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchDeploymentConfigurationType(string value) => new BatchDeploymentConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchDeploymentConfigurationType other && Equals(other); + /// + public bool Equals(BatchDeploymentConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.Serialization.cs new file mode 100644 index 0000000000000..85f5f9426f9d0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class BatchPipelineComponentDeploymentConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ComponentId)) + { + if (ComponentId != null) + { + writer.WritePropertyName("componentId"u8); + writer.WriteObjectValue(ComponentId); + } + else + { + writer.WriteNull("componentId"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Settings)) + { + if (Settings != null) + { + writer.WritePropertyName("settings"u8); + writer.WriteStartObject(); + foreach (var item in Settings) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("settings"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WritePropertyName("deploymentConfigurationType"u8); + writer.WriteStringValue(DeploymentConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static BatchPipelineComponentDeploymentConfiguration DeserializeBatchPipelineComponentDeploymentConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional componentId = default; + Optional description = default; + Optional> settings = default; + Optional> tags = default; + BatchDeploymentConfigurationType deploymentConfigurationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("componentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + componentId = null; + continue; + } + componentId = MachineLearningIdAssetReference.DeserializeMachineLearningIdAssetReference(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + settings = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + settings = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("deploymentConfigurationType"u8)) + { + deploymentConfigurationType = new BatchDeploymentConfigurationType(property.Value.GetString()); + continue; + } + } + return new BatchPipelineComponentDeploymentConfiguration(deploymentConfigurationType, componentId.Value, description.Value, Optional.ToDictionary(settings), Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.cs new file mode 100644 index 0000000000000..b0a074229e56e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchPipelineComponentDeploymentConfiguration.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Properties for a Batch Pipeline Component Deployment. + public partial class BatchPipelineComponentDeploymentConfiguration : BatchDeploymentConfiguration + { + /// Initializes a new instance of BatchPipelineComponentDeploymentConfiguration. + public BatchPipelineComponentDeploymentConfiguration() + { + Settings = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + DeploymentConfigurationType = BatchDeploymentConfigurationType.PipelineComponent; + } + + /// Initializes a new instance of BatchPipelineComponentDeploymentConfiguration. + /// [Required] The type of the deployment. + /// The ARM id of the component to be run. + /// The description which will be applied to the job. + /// Run-time settings for the pipeline job. + /// The tags which will be applied to the job. + internal BatchPipelineComponentDeploymentConfiguration(BatchDeploymentConfigurationType deploymentConfigurationType, MachineLearningIdAssetReference componentId, string description, IDictionary settings, IDictionary tags) : base(deploymentConfigurationType) + { + ComponentId = componentId; + Description = description; + Settings = settings; + Tags = tags; + DeploymentConfigurationType = deploymentConfigurationType; + } + + /// The ARM id of the component to be run. + public MachineLearningIdAssetReference ComponentId { get; set; } + /// The description which will be applied to the job. + public string Description { get; set; } + /// Run-time settings for the pipeline job. + public IDictionary Settings { get; set; } + /// The tags which will be applied to the job. + public IDictionary Tags { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs new file mode 100644 index 0000000000000..3ab7a7b5c4130 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class BlobReferenceForConsumptionDto + { + internal static BlobReferenceForConsumptionDto DeserializeBlobReferenceForConsumptionDto(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional blobUri = default; + Optional credential = default; + Optional storageAccountArmId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blobUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + blobUri = null; + continue; + } + blobUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("credential"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + credential = null; + continue; + } + credential = PendingUploadCredentialDto.DeserializePendingUploadCredentialDto(property.Value); + continue; + } + if (property.NameEquals("storageAccountArmId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + storageAccountArmId = null; + continue; + } + storageAccountArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new BlobReferenceForConsumptionDto(blobUri.Value, credential.Value, storageAccountArmId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs new file mode 100644 index 0000000000000..1a5a00753dc35 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The BlobReferenceForConsumptionDto. + public partial class BlobReferenceForConsumptionDto + { + /// Initializes a new instance of BlobReferenceForConsumptionDto. + internal BlobReferenceForConsumptionDto() + { + } + + /// Initializes a new instance of BlobReferenceForConsumptionDto. + /// + /// Blob URI path for client to upload data. + /// Example: https://blob.windows.core.net/Container/Path + /// + /// + /// Credential info to access storage account + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Arm ID of the storage account to use. + internal BlobReferenceForConsumptionDto(Uri blobUri, PendingUploadCredentialDto credential, ResourceIdentifier storageAccountArmId) + { + BlobUri = blobUri; + Credential = credential; + StorageAccountArmId = storageAccountArmId; + } + + /// + /// Blob URI path for client to upload data. + /// Example: https://blob.windows.core.net/Container/Path + /// + public Uri BlobUri { get; } + /// + /// Credential info to access storage account + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public PendingUploadCredentialDto Credential { get; } + /// Arm ID of the storage account to use. + public ResourceIdentifier StorageAccountArmId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetric.cs new file mode 100644 index 0000000000000..9f14f675a04d8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetric.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CategoricalDataDriftMetric. + public readonly partial struct CategoricalDataDriftMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CategoricalDataDriftMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JensenShannonDistanceValue = "JensenShannonDistance"; + private const string PopulationStabilityIndexValue = "PopulationStabilityIndex"; + private const string PearsonsChiSquaredTestValue = "PearsonsChiSquaredTest"; + + /// The Jensen Shannon Distance (JSD) metric. + public static CategoricalDataDriftMetric JensenShannonDistance { get; } = new CategoricalDataDriftMetric(JensenShannonDistanceValue); + /// The Population Stability Index (PSI) metric. + public static CategoricalDataDriftMetric PopulationStabilityIndex { get; } = new CategoricalDataDriftMetric(PopulationStabilityIndexValue); + /// The Pearsons Chi Squared Test metric. + public static CategoricalDataDriftMetric PearsonsChiSquaredTest { get; } = new CategoricalDataDriftMetric(PearsonsChiSquaredTestValue); + /// Determines if two values are the same. + public static bool operator ==(CategoricalDataDriftMetric left, CategoricalDataDriftMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CategoricalDataDriftMetric left, CategoricalDataDriftMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CategoricalDataDriftMetric(string value) => new CategoricalDataDriftMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CategoricalDataDriftMetric other && Equals(other); + /// + public bool Equals(CategoricalDataDriftMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..eebe83aa59d27 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CategoricalDataDriftMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static CategoricalDataDriftMetricThreshold DeserializeCategoricalDataDriftMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CategoricalDataDriftMetric metric = default; + MonitoringFeatureDataType dataType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new CategoricalDataDriftMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new CategoricalDataDriftMetricThreshold(dataType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.cs new file mode 100644 index 0000000000000..bac24ccdeb0bc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataDriftMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CategoricalDataDriftMetricThreshold. + public partial class CategoricalDataDriftMetricThreshold : DataDriftMetricThresholdBase + { + /// Initializes a new instance of CategoricalDataDriftMetricThreshold. + /// [Required] The categorical data drift metric to calculate. + public CategoricalDataDriftMetricThreshold(CategoricalDataDriftMetric metric) + { + Metric = metric; + DataType = MonitoringFeatureDataType.Categorical; + } + + /// Initializes a new instance of CategoricalDataDriftMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The categorical data drift metric to calculate. + internal CategoricalDataDriftMetricThreshold(MonitoringFeatureDataType dataType, MonitoringThreshold threshold, CategoricalDataDriftMetric metric) : base(dataType, threshold) + { + Metric = metric; + DataType = dataType; + } + + /// [Required] The categorical data drift metric to calculate. + public CategoricalDataDriftMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetric.cs new file mode 100644 index 0000000000000..089e056550e5a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetric.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CategoricalDataQualityMetric. + public readonly partial struct CategoricalDataQualityMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CategoricalDataQualityMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NullValueRateValue = "NullValueRate"; + private const string DataTypeErrorRateValue = "DataTypeErrorRate"; + private const string OutOfBoundsRateValue = "OutOfBoundsRate"; + + /// Calculates the rate of null values. + public static CategoricalDataQualityMetric NullValueRate { get; } = new CategoricalDataQualityMetric(NullValueRateValue); + /// Calculates the rate of data type errors. + public static CategoricalDataQualityMetric DataTypeErrorRate { get; } = new CategoricalDataQualityMetric(DataTypeErrorRateValue); + /// Calculates the rate values are out of bounds. + public static CategoricalDataQualityMetric OutOfBoundsRate { get; } = new CategoricalDataQualityMetric(OutOfBoundsRateValue); + /// Determines if two values are the same. + public static bool operator ==(CategoricalDataQualityMetric left, CategoricalDataQualityMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CategoricalDataQualityMetric left, CategoricalDataQualityMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CategoricalDataQualityMetric(string value) => new CategoricalDataQualityMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CategoricalDataQualityMetric other && Equals(other); + /// + public bool Equals(CategoricalDataQualityMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..d185e7833404a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CategoricalDataQualityMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static CategoricalDataQualityMetricThreshold DeserializeCategoricalDataQualityMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CategoricalDataQualityMetric metric = default; + MonitoringFeatureDataType dataType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new CategoricalDataQualityMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new CategoricalDataQualityMetricThreshold(dataType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.cs new file mode 100644 index 0000000000000..b368cc90f5550 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalDataQualityMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CategoricalDataQualityMetricThreshold. + public partial class CategoricalDataQualityMetricThreshold : DataQualityMetricThresholdBase + { + /// Initializes a new instance of CategoricalDataQualityMetricThreshold. + /// [Required] The categorical data quality metric to calculate. + public CategoricalDataQualityMetricThreshold(CategoricalDataQualityMetric metric) + { + Metric = metric; + DataType = MonitoringFeatureDataType.Categorical; + } + + /// Initializes a new instance of CategoricalDataQualityMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The categorical data quality metric to calculate. + internal CategoricalDataQualityMetricThreshold(MonitoringFeatureDataType dataType, MonitoringThreshold threshold, CategoricalDataQualityMetric metric) : base(dataType, threshold) + { + Metric = metric; + DataType = dataType; + } + + /// [Required] The categorical data quality metric to calculate. + public CategoricalDataQualityMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetric.cs new file mode 100644 index 0000000000000..3f2de97d362f5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetric.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CategoricalPredictionDriftMetric. + public readonly partial struct CategoricalPredictionDriftMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CategoricalPredictionDriftMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JensenShannonDistanceValue = "JensenShannonDistance"; + private const string PopulationStabilityIndexValue = "PopulationStabilityIndex"; + private const string PearsonsChiSquaredTestValue = "PearsonsChiSquaredTest"; + + /// The Jensen Shannon Distance (JSD) metric. + public static CategoricalPredictionDriftMetric JensenShannonDistance { get; } = new CategoricalPredictionDriftMetric(JensenShannonDistanceValue); + /// The Population Stability Index (PSI) metric. + public static CategoricalPredictionDriftMetric PopulationStabilityIndex { get; } = new CategoricalPredictionDriftMetric(PopulationStabilityIndexValue); + /// The Pearsons Chi Squared Test metric. + public static CategoricalPredictionDriftMetric PearsonsChiSquaredTest { get; } = new CategoricalPredictionDriftMetric(PearsonsChiSquaredTestValue); + /// Determines if two values are the same. + public static bool operator ==(CategoricalPredictionDriftMetric left, CategoricalPredictionDriftMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CategoricalPredictionDriftMetric left, CategoricalPredictionDriftMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CategoricalPredictionDriftMetric(string value) => new CategoricalPredictionDriftMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CategoricalPredictionDriftMetric other && Equals(other); + /// + public bool Equals(CategoricalPredictionDriftMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..f703459d2e4a6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CategoricalPredictionDriftMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static CategoricalPredictionDriftMetricThreshold DeserializeCategoricalPredictionDriftMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CategoricalPredictionDriftMetric metric = default; + MonitoringFeatureDataType dataType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new CategoricalPredictionDriftMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new CategoricalPredictionDriftMetricThreshold(dataType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.cs new file mode 100644 index 0000000000000..1cd2539b88dcb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CategoricalPredictionDriftMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CategoricalPredictionDriftMetricThreshold. + public partial class CategoricalPredictionDriftMetricThreshold : PredictionDriftMetricThresholdBase + { + /// Initializes a new instance of CategoricalPredictionDriftMetricThreshold. + /// [Required] The categorical prediction drift metric to calculate. + public CategoricalPredictionDriftMetricThreshold(CategoricalPredictionDriftMetric metric) + { + Metric = metric; + DataType = MonitoringFeatureDataType.Categorical; + } + + /// Initializes a new instance of CategoricalPredictionDriftMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The categorical prediction drift metric to calculate. + internal CategoricalPredictionDriftMetricThreshold(MonitoringFeatureDataType dataType, MonitoringThreshold threshold, CategoricalPredictionDriftMetric metric) : base(dataType, threshold) + { + Metric = metric; + DataType = dataType; + } + + /// [Required] The categorical prediction drift metric to calculate. + public CategoricalPredictionDriftMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs index eecf2d8b2ed0a..3aff2adad66cf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs @@ -78,7 +78,7 @@ public ClassificationModel(string value) public static ClassificationModel DecisionTree { get; } = new ClassificationModel(DecisionTreeValue); /// /// Random forest is a supervised learning algorithm. - /// The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. + /// The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. /// The general idea of the bagging method is that a combination of learning models increases the overall result. /// public static ClassificationModel RandomForest { get; } = new ClassificationModel(RandomForestValue); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetric.cs new file mode 100644 index 0000000000000..9bdcde202a1ef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetric.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The ClassificationModelPerformanceMetric. + public readonly partial struct ClassificationModelPerformanceMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClassificationModelPerformanceMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AccuracyValue = "Accuracy"; + private const string PrecisionValue = "Precision"; + private const string RecallValue = "Recall"; + + /// Calculates the accuracy of the model predictions. + public static ClassificationModelPerformanceMetric Accuracy { get; } = new ClassificationModelPerformanceMetric(AccuracyValue); + /// Calculates the precision of the model predictions. + public static ClassificationModelPerformanceMetric Precision { get; } = new ClassificationModelPerformanceMetric(PrecisionValue); + /// Calculates the recall of the model predictions. + public static ClassificationModelPerformanceMetric Recall { get; } = new ClassificationModelPerformanceMetric(RecallValue); + /// Determines if two values are the same. + public static bool operator ==(ClassificationModelPerformanceMetric left, ClassificationModelPerformanceMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClassificationModelPerformanceMetric left, ClassificationModelPerformanceMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ClassificationModelPerformanceMetric(string value) => new ClassificationModelPerformanceMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClassificationModelPerformanceMetric other && Equals(other); + /// + public bool Equals(ClassificationModelPerformanceMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..63f7e0c7d37f1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ClassificationModelPerformanceMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("modelType"u8); + writer.WriteStringValue(ModelType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static ClassificationModelPerformanceMetricThreshold DeserializeClassificationModelPerformanceMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ClassificationModelPerformanceMetric metric = default; + MonitoringModelType modelType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new ClassificationModelPerformanceMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("modelType"u8)) + { + modelType = new MonitoringModelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new ClassificationModelPerformanceMetricThreshold(modelType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.cs new file mode 100644 index 0000000000000..b42ee68855fb3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModelPerformanceMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The ClassificationModelPerformanceMetricThreshold. + public partial class ClassificationModelPerformanceMetricThreshold : ModelPerformanceMetricThresholdBase + { + /// Initializes a new instance of ClassificationModelPerformanceMetricThreshold. + /// [Required] The classification model performance to calculate. + public ClassificationModelPerformanceMetricThreshold(ClassificationModelPerformanceMetric metric) + { + Metric = metric; + ModelType = MonitoringModelType.Classification; + } + + /// Initializes a new instance of ClassificationModelPerformanceMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The classification model performance to calculate. + internal ClassificationModelPerformanceMetricThreshold(MonitoringModelType modelType, MonitoringThreshold threshold, ClassificationModelPerformanceMetric metric) : base(modelType, threshold) + { + Metric = metric; + ModelType = modelType; + } + + /// [Required] The classification model performance to calculate. + public ClassificationModelPerformanceMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs index c761f62cb82ec..2bd19537e1166 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs @@ -74,6 +74,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("featurizationSettings"); } } + if (Optional.IsDefined(FixedParameters)) + { + if (FixedParameters != null) + { + writer.WritePropertyName("fixedParameters"u8); + writer.WriteObjectValue(FixedParameters); + } + else + { + writer.WriteNull("fixedParameters"); + } + } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -98,6 +110,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("nCrossValidations"); } } + if (Optional.IsCollectionDefined(SearchSpace)) + { + if (SearchSpace != null) + { + writer.WritePropertyName("searchSpace"u8); + writer.WriteStartArray(); + foreach (var item in SearchSpace) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("searchSpace"); + } + } + if (Optional.IsDefined(SweepSettings)) + { + if (SweepSettings != null) + { + writer.WritePropertyName("sweepSettings"u8); + writer.WriteObjectValue(SweepSettings); + } + else + { + writer.WriteNull("sweepSettings"); + } + } if (Optional.IsDefined(TestData)) { if (TestData != null) @@ -193,8 +234,11 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele Optional trainingSettings = default; Optional> cvSplitColumnNames = default; Optional featurizationSettings = default; + Optional fixedParameters = default; Optional limitSettings = default; Optional nCrossValidations = default; + Optional> searchSpace = default; + Optional sweepSettings = default; Optional testData = default; Optional testDataSize = default; Optional validationData = default; @@ -260,6 +304,16 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value); continue; } + if (property.NameEquals("fixedParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fixedParameters = null; + continue; + } + fixedParameters = TableFixedParameters.DeserializeTableFixedParameters(property.Value); + continue; + } if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -280,6 +334,31 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value); continue; } + if (property.NameEquals("searchSpace"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchSpace = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TableParameterSubspace.DeserializeTableParameterSubspace(item)); + } + searchSpace = array; + continue; + } + if (property.NameEquals("sweepSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sweepSettings = null; + continue; + } + sweepSettings = TableSweepSettings.DeserializeTableSweepSettings(property.Value); + continue; + } if (property.NameEquals("testData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -360,7 +439,7 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele continue; } } - return new ClassificationTask(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, positiveLabel.Value, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, limitSettings.Value, nCrossValidations.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); + return new ClassificationTask(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, positiveLabel.Value, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, fixedParameters.Value, limitSettings.Value, nCrossValidations.Value, Optional.ToList(searchSpace), sweepSettings.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs index cb3374bf796a4..6fb273ffcc916 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs @@ -22,6 +22,7 @@ public ClassificationTask(MachineLearningTableJobInput trainingData) : base(trai Argument.AssertNotNull(trainingData, nameof(trainingData)); CvSplitColumnNames = new ChangeTrackingList(); + SearchSpace = new ChangeTrackingList(); TaskType = TaskType.Classification; } @@ -38,6 +39,7 @@ public ClassificationTask(MachineLearningTableJobInput trainingData) : base(trai /// Inputs for training phase for an AutoML Job. /// Columns to use for CVSplit data. /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. /// /// Number of cross validation folds to be applied on training dataset @@ -45,6 +47,8 @@ public ClassificationTask(MachineLearningTableJobInput trainingData) : base(trai /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Test data input. /// /// The fraction of test dataset that needs to be set aside for validation purpose. @@ -58,15 +62,18 @@ public ClassificationTask(MachineLearningTableJobInput trainingData) : base(trai /// Applied when validation dataset is not provided. /// /// 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. - internal ClassificationTask(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, string positiveLabel, ClassificationPrimaryMetric? primaryMetric, ClassificationTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal ClassificationTask(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, string positiveLabel, ClassificationPrimaryMetric? primaryMetric, ClassificationTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableFixedParameters fixedParameters, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, IList searchSpace, TableSweepSettings sweepSettings, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) { PositiveLabel = positiveLabel; PrimaryMetric = primaryMetric; TrainingSettings = trainingSettings; CvSplitColumnNames = cvSplitColumnNames; FeaturizationSettings = featurizationSettings; + FixedParameters = fixedParameters; LimitSettings = limitSettings; NCrossValidations = nCrossValidations; + SearchSpace = searchSpace; + SweepSettings = sweepSettings; TestData = testData; TestDataSize = testDataSize; ValidationData = validationData; @@ -85,6 +92,8 @@ internal ClassificationTask(MachineLearningLogVerbosity? logVerbosity, string ta public IList CvSplitColumnNames { get; set; } /// Featurization inputs needed for AutoML job. public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } + /// Model/training parameters that will remain constant throughout training. + public TableFixedParameters FixedParameters { get; set; } /// Execution constraints for AutoMLJob. public TableVerticalLimitSettings LimitSettings { get; set; } /// @@ -94,6 +103,10 @@ internal ClassificationTask(MachineLearningLogVerbosity? logVerbosity, string ta /// The available derived classes include and . /// public NCrossValidations NCrossValidations { get; set; } + /// Search space for sampling different combinations of models and their hyperparameters. + public IList SearchSpace { get; set; } + /// Settings for model sweeping and hyperparameter tuning. + public TableSweepSettings SweepSettings { get; set; } /// Test data input. public MachineLearningTableJobInput TestData { get; set; } /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs index 400f43fc0668d..4c7c8f63a07df 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs @@ -93,6 +93,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("stackEnsembleSettings"); } } + if (Optional.IsDefined(TrainingMode)) + { + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -111,6 +116,7 @@ internal static ClassificationTrainingSettings DeserializeClassificationTraining Optional enableVoteEnsemble = default; Optional ensembleModelDownloadTimeout = default; Optional stackEnsembleSettings = default; + Optional trainingMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("allowedTrainingAlgorithms"u8)) @@ -207,8 +213,17 @@ internal static ClassificationTrainingSettings DeserializeClassificationTraining stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); continue; } + if (property.NameEquals("trainingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } } - return new ClassificationTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value, Optional.ToList(allowedTrainingAlgorithms), Optional.ToList(blockedTrainingAlgorithms)); + return new ClassificationTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value, Optional.ToNullable(trainingMode), Optional.ToList(allowedTrainingAlgorithms), Optional.ToList(blockedTrainingAlgorithms)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs index fc454b5fc3a8d..709346e6aedbc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs @@ -32,9 +32,14 @@ public ClassificationTrainingSettings() /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// /// Stack ensemble settings for stack ensemble run. + /// + /// TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + /// If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + /// If 'NonDistributed' then only non distributed algorithms are chosen. + /// /// Allowed models for classification task. /// Blocked models for classification task. - internal ClassificationTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings) + internal ClassificationTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, TrainingMode? trainingMode, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings, trainingMode) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.Serialization.cs new file mode 100644 index 0000000000000..f4512aeb0a294 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.Serialization.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CocoExportSummary : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.ToString()); + writer.WriteEndObject(); + } + + internal static CocoExportSummary DeserializeCocoExportSummary(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional containerName = default; + Optional snapshotPath = default; + Optional endDateTime = default; + Optional exportedRowCount = default; + ExportFormatType format = default; + Optional labelingJobId = default; + Optional startDateTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + containerName = null; + continue; + } + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("snapshotPath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + snapshotPath = null; + continue; + } + snapshotPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endDateTime = null; + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exportedRowCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + exportedRowCount = null; + continue; + } + exportedRowCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("format"u8)) + { + format = new ExportFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("labelingJobId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + labelingJobId = null; + continue; + } + labelingJobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + startDateTime = null; + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new CocoExportSummary(Optional.ToNullable(endDateTime), Optional.ToNullable(exportedRowCount), format, labelingJobId.Value, Optional.ToNullable(startDateTime), containerName.Value, snapshotPath.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.cs new file mode 100644 index 0000000000000..50e8dab33eb89 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CocoExportSummary.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CocoExportSummary. + public partial class CocoExportSummary : ExportSummary + { + /// Initializes a new instance of CocoExportSummary. + public CocoExportSummary() + { + Format = ExportFormatType.Coco; + } + + /// Initializes a new instance of CocoExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// [Required] The format of exported labels, also as the discriminator. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + /// The container name to which the labels will be exported. + /// The output path where the labels will be exported. + internal CocoExportSummary(DateTimeOffset? endOn, long? exportedRowCount, ExportFormatType format, string labelingJobId, DateTimeOffset? startOn, string containerName, string snapshotPath) : base(endOn, exportedRowCount, format, labelingJobId, startOn) + { + ContainerName = containerName; + SnapshotPath = snapshotPath; + Format = format; + } + + /// The container name to which the labels will be exported. + public string ContainerName { get; } + /// The output path where the labels will be exported. + public string SnapshotPath { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.Serialization.cs new file mode 100644 index 0000000000000..741bd695e7a40 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class ComputeInstanceAutologgerSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MlflowAutologger)) + { + writer.WritePropertyName("mlflowAutologger"u8); + writer.WriteStringValue(MlflowAutologger.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static ComputeInstanceAutologgerSettings DeserializeComputeInstanceAutologgerSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional mlflowAutologger = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mlflowAutologger"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mlflowAutologger = new MachineLearningFlowAutoLogger(property.Value.GetString()); + continue; + } + } + return new ComputeInstanceAutologgerSettings(Optional.ToNullable(mlflowAutologger)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.cs new file mode 100644 index 0000000000000..156592d1e4b83 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Specifies settings for autologger. + internal partial class ComputeInstanceAutologgerSettings + { + /// Initializes a new instance of ComputeInstanceAutologgerSettings. + public ComputeInstanceAutologgerSettings() + { + } + + /// Initializes a new instance of ComputeInstanceAutologgerSettings. + /// Indicates whether mlflow autologger is enabled for notebooks. + internal ComputeInstanceAutologgerSettings(MachineLearningFlowAutoLogger? mlflowAutologger) + { + MlflowAutologger = mlflowAutologger; + } + + /// Indicates whether mlflow autologger is enabled for notebooks. + public MachineLearningFlowAutoLogger? MlflowAutologger { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.Serialization.cs new file mode 100644 index 0000000000000..3f14eff3af360 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class ComputeRuntimeDto : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SparkRuntimeVersion)) + { + writer.WritePropertyName("sparkRuntimeVersion"u8); + writer.WriteStringValue(SparkRuntimeVersion); + } + writer.WriteEndObject(); + } + + internal static ComputeRuntimeDto DeserializeComputeRuntimeDto(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional sparkRuntimeVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sparkRuntimeVersion"u8)) + { + sparkRuntimeVersion = property.Value.GetString(); + continue; + } + } + return new ComputeRuntimeDto(sparkRuntimeVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs new file mode 100644 index 0000000000000..c3f0e1ca8b12b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The ComputeRuntimeDto. + internal partial class ComputeRuntimeDto + { + /// Initializes a new instance of ComputeRuntimeDto. + public ComputeRuntimeDto() + { + } + + /// Initializes a new instance of ComputeRuntimeDto. + /// + internal ComputeRuntimeDto(string sparkRuntimeVersion) + { + SparkRuntimeVersion = sparkRuntimeVersion; + } + + /// Gets or sets the spark runtime version. + public string SparkRuntimeVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.Serialization.cs new file mode 100644 index 0000000000000..b5cde6c9ebbf3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ComputeStartStopCronSchedule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(StartTime)) + { + if (StartTime != null) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime); + } + else + { + writer.WriteNull("startTime"); + } + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (Optional.IsDefined(Expression)) + { + writer.WritePropertyName("expression"u8); + writer.WriteStringValue(Expression); + } + writer.WriteEndObject(); + } + + internal static ComputeStartStopCronSchedule DeserializeComputeStartStopCronSchedule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional startTime = default; + Optional timeZone = default; + Optional expression = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + startTime = null; + continue; + } + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("expression"u8)) + { + expression = property.Value.GetString(); + continue; + } + } + return new ComputeStartStopCronSchedule(startTime.Value, timeZone.Value, expression.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.cs new file mode 100644 index 0000000000000..338507934a532 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopCronSchedule.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The workflow trigger cron for ComputeStartStop schedule type. + public partial class ComputeStartStopCronSchedule + { + /// Initializes a new instance of ComputeStartStopCronSchedule. + public ComputeStartStopCronSchedule() + { + } + + /// Initializes a new instance of ComputeStartStopCronSchedule. + /// The start time in yyyy-MM-ddTHH:mm:ss format. + /// + /// Specifies time zone in which the schedule runs. + /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + /// + /// + /// [Required] Specifies cron expression of schedule. + /// The expression should follow NCronTab format. + /// + internal ComputeStartStopCronSchedule(string startTime, string timeZone, string expression) + { + StartTime = startTime; + TimeZone = timeZone; + Expression = expression; + } + + /// The start time in yyyy-MM-ddTHH:mm:ss format. + public string StartTime { get; set; } + /// + /// Specifies time zone in which the schedule runs. + /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + /// + public string TimeZone { get; set; } + /// + /// [Required] Specifies cron expression of schedule. + /// The expression should follow NCronTab format. + /// + public string Expression { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.Serialization.cs new file mode 100644 index 0000000000000..60e207c2e4512 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.Serialization.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ComputeStartStopRecurrenceSchedule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Frequency)) + { + writer.WritePropertyName("frequency"u8); + writer.WriteStringValue(Frequency.Value.ToString()); + } + if (Optional.IsDefined(Interval)) + { + writer.WritePropertyName("interval"u8); + writer.WriteNumberValue(Interval.Value); + } + if (Optional.IsDefined(StartTime)) + { + if (StartTime != null) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime); + } + else + { + writer.WriteNull("startTime"); + } + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (Optional.IsDefined(Schedule)) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule); + } + writer.WriteEndObject(); + } + + internal static ComputeStartStopRecurrenceSchedule DeserializeComputeStartStopRecurrenceSchedule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional frequency = default; + Optional interval = default; + Optional startTime = default; + Optional timeZone = default; + Optional schedule = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("frequency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + frequency = new MachineLearningRecurrenceFrequency(property.Value.GetString()); + continue; + } + if (property.NameEquals("interval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + interval = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + startTime = null; + continue; + } + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("schedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedule = MachineLearningRecurrenceSchedule.DeserializeMachineLearningRecurrenceSchedule(property.Value); + continue; + } + } + return new ComputeStartStopRecurrenceSchedule(Optional.ToNullable(frequency), Optional.ToNullable(interval), startTime.Value, timeZone.Value, schedule.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.cs new file mode 100644 index 0000000000000..a8507d84f3c59 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopRecurrenceSchedule.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The workflow trigger recurrence for ComputeStartStop schedule type. + public partial class ComputeStartStopRecurrenceSchedule + { + /// Initializes a new instance of ComputeStartStopRecurrenceSchedule. + public ComputeStartStopRecurrenceSchedule() + { + } + + /// Initializes a new instance of ComputeStartStopRecurrenceSchedule. + /// [Required] The frequency to trigger schedule. + /// [Required] Specifies schedule interval in conjunction with frequency. + /// The start time in yyyy-MM-ddTHH:mm:ss format. + /// + /// Specifies time zone in which the schedule runs. + /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + /// + /// [Required] The recurrence schedule. + internal ComputeStartStopRecurrenceSchedule(MachineLearningRecurrenceFrequency? frequency, int? interval, string startTime, string timeZone, MachineLearningRecurrenceSchedule schedule) + { + Frequency = frequency; + Interval = interval; + StartTime = startTime; + TimeZone = timeZone; + Schedule = schedule; + } + + /// [Required] The frequency to trigger schedule. + public MachineLearningRecurrenceFrequency? Frequency { get; set; } + /// [Required] Specifies schedule interval in conjunction with frequency. + public int? Interval { get; set; } + /// The start time in yyyy-MM-ddTHH:mm:ss format. + public string StartTime { get; set; } + /// + /// Specifies time zone in which the schedule runs. + /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + /// + public string TimeZone { get; set; } + /// [Required] The recurrence schedule. + public MachineLearningRecurrenceSchedule Schedule { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerCommunicationProtocol.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerCommunicationProtocol.cs new file mode 100644 index 0000000000000..839a89e349138 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerCommunicationProtocol.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Protocol over which communication will happen over this endpoint. + public readonly partial struct ContainerCommunicationProtocol : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerCommunicationProtocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TcpValue = "tcp"; + private const string UdpValue = "udp"; + private const string HttpValue = "http"; + + /// tcp. + public static ContainerCommunicationProtocol Tcp { get; } = new ContainerCommunicationProtocol(TcpValue); + /// udp. + public static ContainerCommunicationProtocol Udp { get; } = new ContainerCommunicationProtocol(UdpValue); + /// http. + public static ContainerCommunicationProtocol Http { get; } = new ContainerCommunicationProtocol(HttpValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerCommunicationProtocol left, ContainerCommunicationProtocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerCommunicationProtocol left, ContainerCommunicationProtocol right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerCommunicationProtocol(string value) => new ContainerCommunicationProtocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerCommunicationProtocol other && Equals(other); + /// + public bool Equals(ContainerCommunicationProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.Serialization.cs new file mode 100644 index 0000000000000..0f253b91063e5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ContainerEndpoint : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.Value.ToString()); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteNumberValue(Target.Value); + } + if (Optional.IsDefined(Published)) + { + if (Published != null) + { + writer.WritePropertyName("published"u8); + writer.WriteNumberValue(Published.Value); + } + else + { + writer.WriteNull("published"); + } + } + if (Optional.IsDefined(HostIP)) + { + if (HostIP != null) + { + writer.WritePropertyName("hostIp"u8); + writer.WriteStringValue(HostIP); + } + else + { + writer.WriteNull("hostIp"); + } + } + writer.WriteEndObject(); + } + + internal static ContainerEndpoint DeserializeContainerEndpoint(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional protocol = default; + Optional name = default; + Optional target = default; + Optional published = default; + Optional hostIP = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protocol"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protocol = new ContainerCommunicationProtocol(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("target"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + target = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("published"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + published = null; + continue; + } + published = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("hostIp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + hostIP = null; + continue; + } + hostIP = property.Value.GetString(); + continue; + } + } + return new ContainerEndpoint(Optional.ToNullable(protocol), name.Value, Optional.ToNullable(target), Optional.ToNullable(published), hostIP.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs new file mode 100644 index 0000000000000..1fdd0ecb71c94 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The ContainerEndpoint. + public partial class ContainerEndpoint + { + /// Initializes a new instance of ContainerEndpoint. + public ContainerEndpoint() + { + } + + /// Initializes a new instance of ContainerEndpoint. + /// Protocol over which communication will happen over this endpoint. + /// Name of the Endpoint. + /// Application port inside the container. + /// Port over which the application is exposed from container. + /// Host IP over which the application is exposed from the container. + internal ContainerEndpoint(ContainerCommunicationProtocol? protocol, string name, int? target, int? published, string hostIP) + { + Protocol = protocol; + Name = name; + Target = target; + Published = published; + HostIP = hostIP; + } + + /// Protocol over which communication will happen over this endpoint. + public ContainerCommunicationProtocol? Protocol { get; set; } + /// Name of the Endpoint. + public string Name { get; set; } + /// Application port inside the container. + public int? Target { get; set; } + /// Port over which the application is exposed from container. + public int? Published { get; set; } + /// Host IP over which the application is exposed from the container. + public string HostIP { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs index df1c551b9cf2c..775bdf943cfc9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs @@ -16,13 +16,13 @@ public CosmosDbSettings() } /// Initializes a new instance of CosmosDbSettings. - /// The throughput of the collections in cosmosdb database. + /// internal CosmosDbSettings(int? collectionsThroughput) { CollectionsThroughput = collectionsThroughput; } - /// The throughput of the collections in cosmosdb database. + /// Gets or sets the collections throughput. public int? CollectionsThroughput { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.Serialization.cs new file mode 100644 index 0000000000000..a1429904dc917 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CreateMonitorAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("monitorDefinition"u8); + writer.WriteObjectValue(MonitorDefinition); + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.ToString()); + writer.WriteEndObject(); + } + + internal static CreateMonitorAction DeserializeCreateMonitorAction(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitorDefinition monitorDefinition = default; + ScheduleActionType actionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("monitorDefinition"u8)) + { + monitorDefinition = MonitorDefinition.DeserializeMonitorDefinition(property.Value); + continue; + } + if (property.NameEquals("actionType"u8)) + { + actionType = new ScheduleActionType(property.Value.GetString()); + continue; + } + } + return new CreateMonitorAction(actionType, monitorDefinition); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.cs new file mode 100644 index 0000000000000..6f5ada0ed9258 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CreateMonitorAction.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CreateMonitorAction. + public partial class CreateMonitorAction : MachineLearningScheduleAction + { + /// Initializes a new instance of CreateMonitorAction. + /// [Required] Defines the monitor. + /// is null. + public CreateMonitorAction(MonitorDefinition monitorDefinition) + { + Argument.AssertNotNull(monitorDefinition, nameof(monitorDefinition)); + + MonitorDefinition = monitorDefinition; + ActionType = ScheduleActionType.CreateMonitor; + } + + /// Initializes a new instance of CreateMonitorAction. + /// [Required] Specifies the action type of the schedule. + /// [Required] Defines the monitor. + internal CreateMonitorAction(ScheduleActionType actionType, MonitorDefinition monitorDefinition) : base(actionType) + { + MonitorDefinition = monitorDefinition; + ActionType = actionType; + } + + /// [Required] Defines the monitor. + public MonitorDefinition MonitorDefinition { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs index d5aab2ec1aa43..71841967407fa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs @@ -27,6 +27,8 @@ public CredentialsType(string value) private const string NoneValue = "None"; private const string SasValue = "Sas"; private const string ServicePrincipalValue = "ServicePrincipal"; + private const string KerberosKeytabValue = "KerberosKeytab"; + private const string KerberosPasswordValue = "KerberosPassword"; /// AccountKey. public static CredentialsType AccountKey { get; } = new CredentialsType(AccountKeyValue); @@ -38,6 +40,10 @@ public CredentialsType(string value) public static CredentialsType Sas { get; } = new CredentialsType(SasValue); /// ServicePrincipal. public static CredentialsType ServicePrincipal { get; } = new CredentialsType(ServicePrincipalValue); + /// KerberosKeytab. + public static CredentialsType KerberosKeytab { get; } = new CredentialsType(KerberosKeytabValue); + /// KerberosPassword. + public static CredentialsType KerberosPassword { get; } = new CredentialsType(KerberosPasswordValue); /// Determines if two values are the same. public static bool operator ==(CredentialsType left, CredentialsType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.Serialization.cs new file mode 100644 index 0000000000000..f740a4743aac5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.Serialization.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CsvExportSummary : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.ToString()); + writer.WriteEndObject(); + } + + internal static CsvExportSummary DeserializeCsvExportSummary(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional containerName = default; + Optional snapshotPath = default; + Optional endDateTime = default; + Optional exportedRowCount = default; + ExportFormatType format = default; + Optional labelingJobId = default; + Optional startDateTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + containerName = null; + continue; + } + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("snapshotPath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + snapshotPath = null; + continue; + } + snapshotPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endDateTime = null; + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exportedRowCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + exportedRowCount = null; + continue; + } + exportedRowCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("format"u8)) + { + format = new ExportFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("labelingJobId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + labelingJobId = null; + continue; + } + labelingJobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + startDateTime = null; + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new CsvExportSummary(Optional.ToNullable(endDateTime), Optional.ToNullable(exportedRowCount), format, labelingJobId.Value, Optional.ToNullable(startDateTime), containerName.Value, snapshotPath.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.cs new file mode 100644 index 0000000000000..b765715fb5f58 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CsvExportSummary.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CsvExportSummary. + public partial class CsvExportSummary : ExportSummary + { + /// Initializes a new instance of CsvExportSummary. + public CsvExportSummary() + { + Format = ExportFormatType.CSV; + } + + /// Initializes a new instance of CsvExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// [Required] The format of exported labels, also as the discriminator. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + /// The container name to which the labels will be exported. + /// The output path where the labels will be exported. + internal CsvExportSummary(DateTimeOffset? endOn, long? exportedRowCount, ExportFormatType format, string labelingJobId, DateTimeOffset? startOn, string containerName, string snapshotPath) : base(endOn, exportedRowCount, format, labelingJobId, startOn) + { + ContainerName = containerName; + SnapshotPath = snapshotPath; + Format = format; + } + + /// The container name to which the labels will be exported. + public string ContainerName { get; } + /// The output path where the labels will be exported. + public string SnapshotPath { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.Serialization.cs new file mode 100644 index 0000000000000..c83e562fdb468 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CustomInferencingServer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InferenceConfiguration)) + { + if (InferenceConfiguration != null) + { + writer.WritePropertyName("inferenceConfiguration"u8); + writer.WriteObjectValue(InferenceConfiguration); + } + else + { + writer.WriteNull("inferenceConfiguration"); + } + } + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType.ToString()); + writer.WriteEndObject(); + } + + internal static CustomInferencingServer DeserializeCustomInferencingServer(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional inferenceConfiguration = default; + InferencingServerType serverType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inferenceConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inferenceConfiguration = null; + continue; + } + inferenceConfiguration = OnlineInferenceConfiguration.DeserializeOnlineInferenceConfiguration(property.Value); + continue; + } + if (property.NameEquals("serverType"u8)) + { + serverType = new InferencingServerType(property.Value.GetString()); + continue; + } + } + return new CustomInferencingServer(serverType, inferenceConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.cs new file mode 100644 index 0000000000000..8fbbe33bf2a74 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomInferencingServer.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Custom inference server configurations. + public partial class CustomInferencingServer : InferencingServer + { + /// Initializes a new instance of CustomInferencingServer. + public CustomInferencingServer() + { + ServerType = InferencingServerType.Custom; + } + + /// Initializes a new instance of CustomInferencingServer. + /// [Required] Inferencing server type for various targets. + /// Inference configuration for custom inferencing. + internal CustomInferencingServer(InferencingServerType serverType, OnlineInferenceConfiguration inferenceConfiguration) : base(serverType) + { + InferenceConfiguration = inferenceConfiguration; + ServerType = serverType; + } + + /// Inference configuration for custom inferencing. + public OnlineInferenceConfiguration InferenceConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.Serialization.cs new file mode 100644 index 0000000000000..cfe662b7f9e6a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class CustomKeys : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Keys)) + { + writer.WritePropertyName("keys"u8); + writer.WriteStartObject(); + foreach (var item in Keys) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static CustomKeys DeserializeCustomKeys(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> keys = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + keys = dictionary; + continue; + } + } + return new CustomKeys(Optional.ToDictionary(keys)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.cs new file mode 100644 index 0000000000000..902a75e5003a7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeys.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Custom Keys credential object. + internal partial class CustomKeys + { + /// Initializes a new instance of CustomKeys. + public CustomKeys() + { + Keys = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of CustomKeys. + /// Dictionary of <string>. + internal CustomKeys(IDictionary keys) + { + Keys = keys; + } + + /// Dictionary of <string>. + public IDictionary Keys { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs new file mode 100644 index 0000000000000..d166ede3cf2b7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CustomKeysWorkspaceConnectionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(ExpiryOn)) + { + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + writer.WriteEndObject(); + } + + internal static CustomKeysWorkspaceConnectionProperties DeserializeCustomKeysWorkspaceConnectionProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional expiryTime = default; + Optional metadata = default; + Optional target = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credentials = CustomKeys.DeserializeCustomKeys(property.Value); + continue; + } + if (property.NameEquals("authType"u8)) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("expiryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + } + return new CustomKeysWorkspaceConnectionProperties(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs new file mode 100644 index 0000000000000..ac8d8c57caebe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Category:= CustomKeys + /// AuthType:= CustomKeys (as type discriminator) + /// Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys + /// Target:= {any value} + /// Use Metadata property bag for ApiVersion and other metadata fields + /// + public partial class CustomKeysWorkspaceConnectionProperties : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of CustomKeysWorkspaceConnectionProperties. + public CustomKeysWorkspaceConnectionProperties() + { + AuthType = MachineLearningConnectionAuthType.CustomKeys; + } + + /// Initializes a new instance of CustomKeysWorkspaceConnectionProperties. + /// Authentication type of the connection target. + /// Category of the connection. + /// + /// Any object. + /// + /// Custom Keys credential object. + internal CustomKeysWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, CustomKeys credentials) : base(authType, category, expiryOn, metadata, target) + { + Credentials = credentials; + AuthType = authType; + } + + /// Custom Keys credential object. + internal CustomKeys Credentials { get; set; } + /// Dictionary of <string>. + public IDictionary CredentialsKeys + { + get + { + if (Credentials is null) + Credentials = new CustomKeys(); + return Credentials.Keys; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..6ee4e5147b665 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CustomMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static CustomMetricThreshold DeserializeCustomMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string metric = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = property.Value.GetString(); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new CustomMetricThreshold(metric, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs new file mode 100644 index 0000000000000..4294c0a8eb9b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CustomMetricThreshold. + public partial class CustomMetricThreshold + { + /// Initializes a new instance of CustomMetricThreshold. + /// [Required] The user-defined metric to calculate. + /// is null. + public CustomMetricThreshold(string metric) + { + Argument.AssertNotNull(metric, nameof(metric)); + + Metric = metric; + } + + /// Initializes a new instance of CustomMetricThreshold. + /// [Required] The user-defined metric to calculate. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal CustomMetricThreshold(string metric, MonitoringThreshold threshold) + { + Metric = metric; + Threshold = threshold; + } + + /// [Required] The user-defined metric to calculate. + public string Metric { get; set; } + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs new file mode 100644 index 0000000000000..182dd9e58ccab --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CustomMonitoringSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); + if (Optional.IsCollectionDefined(InputAssets)) + { + if (InputAssets != null) + { + writer.WritePropertyName("inputAssets"u8); + writer.WriteStartObject(); + foreach (var item in InputAssets) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("inputAssets"); + } + } + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs != null) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("inputs"); + } + } + writer.WritePropertyName("metricThresholds"u8); + writer.WriteStartArray(); + foreach (var item in MetricThresholds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("workspaceConnection"u8); + writer.WriteObjectValue(WorkspaceConnection); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static CustomMonitoringSignal DeserializeCustomMonitoringSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string componentId = default; + Optional> inputAssets = default; + Optional> inputs = default; + IList metricThresholds = default; + MonitoringWorkspaceConnection workspaceConnection = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("componentId"u8)) + { + componentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputAssets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inputAssets = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property0.Value)); + } + inputAssets = dictionary; + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inputs = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value)); + } + inputs = dictionary; + continue; + } + if (property.NameEquals("metricThresholds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomMetricThreshold.DeserializeCustomMetricThreshold(item)); + } + metricThresholds = array; + continue; + } + if (property.NameEquals("workspaceConnection"u8)) + { + workspaceConnection = MonitoringWorkspaceConnection.DeserializeMonitoringWorkspaceConnection(property.Value); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new CustomMonitoringSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, componentId, Optional.ToDictionary(inputAssets), Optional.ToDictionary(inputs), metricThresholds, workspaceConnection); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs new file mode 100644 index 0000000000000..820c2ba78d335 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The CustomMonitoringSignal. + public partial class CustomMonitoringSignal : MonitoringSignalBase + { + /// Initializes a new instance of CustomMonitoringSignal. + /// [Required] ARM resource ID of the component resource used to calculate the custom metrics. + /// [Required] A list of metrics to calculate and their associated thresholds. + /// [Required] A list of metrics to calculate and their associated thresholds. + /// , or is null. + public CustomMonitoringSignal(string componentId, IEnumerable metricThresholds, MonitoringWorkspaceConnection workspaceConnection) + { + Argument.AssertNotNull(componentId, nameof(componentId)); + Argument.AssertNotNull(metricThresholds, nameof(metricThresholds)); + Argument.AssertNotNull(workspaceConnection, nameof(workspaceConnection)); + + ComponentId = componentId; + InputAssets = new ChangeTrackingDictionary(); + Inputs = new ChangeTrackingDictionary(); + MetricThresholds = metricThresholds.ToList(); + WorkspaceConnection = workspaceConnection; + SignalType = MonitoringSignalType.Custom; + } + + /// Initializes a new instance of CustomMonitoringSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// [Required] ARM resource ID of the component resource used to calculate the custom metrics. + /// + /// Monitoring assets to take as input. Key is the component input port name, value is the data asset. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// [Required] A list of metrics to calculate and their associated thresholds. + internal CustomMonitoringSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, string componentId, IDictionary inputAssets, IDictionary inputs, IList metricThresholds, MonitoringWorkspaceConnection workspaceConnection) : base(mode, properties, signalType) + { + ComponentId = componentId; + InputAssets = inputAssets; + Inputs = inputs; + MetricThresholds = metricThresholds; + WorkspaceConnection = workspaceConnection; + SignalType = signalType; + } + + /// [Required] ARM resource ID of the component resource used to calculate the custom metrics. + public string ComponentId { get; set; } + /// + /// Monitoring assets to take as input. Key is the component input port name, value is the data asset. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public IDictionary InputAssets { get; set; } + /// + /// Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + public IDictionary Inputs { get; set; } + /// [Required] A list of metrics to calculate and their associated thresholds. + public IList MetricThresholds { get; } + /// [Required] A list of metrics to calculate and their associated thresholds. + public MonitoringWorkspaceConnection WorkspaceConnection { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs new file mode 100644 index 0000000000000..35fea5816e801 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class CustomService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Docker)) + { + if (Docker != null) + { + writer.WritePropertyName("docker"u8); + writer.WriteObjectValue(Docker); + } + else + { + writer.WriteNull("docker"); + } + } + if (Optional.IsCollectionDefined(Endpoints)) + { + writer.WritePropertyName("endpoints"u8); + writer.WriteStartArray(); + foreach (var item in Endpoints) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Volumes)) + { + writer.WritePropertyName("volumes"u8); + writer.WriteStartArray(); + foreach (var item in Volumes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + + internal static CustomService DeserializeCustomService(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional image = default; + Optional> environmentVariables = default; + Optional docker = default; + Optional> endpoints = default; + Optional> volumes = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("image"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + image = ImageSetting.DeserializeImageSetting(property.Value); + continue; + } + if (property.NameEquals("environmentVariables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, EnvironmentVariable.DeserializeEnvironmentVariable(property0.Value)); + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("docker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + docker = null; + continue; + } + docker = DockerSetting.DeserializeDockerSetting(property.Value); + continue; + } + if (property.NameEquals("endpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerEndpoint.DeserializeContainerEndpoint(item)); + } + endpoints = array; + continue; + } + if (property.NameEquals("volumes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VolumeDefinition.DeserializeVolumeDefinition(item)); + } + volumes = array; + continue; + } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new CustomService(name.Value, image.Value, Optional.ToDictionary(environmentVariables), docker.Value, Optional.ToList(endpoints), Optional.ToList(volumes), additionalProperties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs new file mode 100644 index 0000000000000..cbfa1f34b52d7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Specifies the custom service configuration. + public partial class CustomService + { + /// Initializes a new instance of CustomService. + public CustomService() + { + EnvironmentVariables = new ChangeTrackingDictionary(); + Endpoints = new ChangeTrackingList(); + Volumes = new ChangeTrackingList(); + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of CustomService. + /// Name of the Custom Service. + /// Describes the Image Specifications. + /// Environment Variable for the container. + /// Describes the docker settings for the image. + /// Configuring the endpoints for the container. + /// Configuring the volumes for the container. + /// Additional Properties. + internal CustomService(string name, ImageSetting image, IDictionary environmentVariables, DockerSetting docker, IList endpoints, IList volumes, IDictionary additionalProperties) + { + Name = name; + Image = image; + EnvironmentVariables = environmentVariables; + Docker = docker; + Endpoints = endpoints; + Volumes = volumes; + AdditionalProperties = additionalProperties; + } + + /// Name of the Custom Service. + public string Name { get; set; } + /// Describes the Image Specifications. + public ImageSetting Image { get; set; } + /// Environment Variable for the container. + public IDictionary EnvironmentVariables { get; } + /// Describes the docker settings for the image. + public DockerSetting Docker { get; set; } + /// Configuring the endpoints for the container. + public IList Endpoints { get; } + /// Configuring the volumes for the container. + public IList Volumes { get; } + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs new file mode 100644 index 0000000000000..8017a71bfdef7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataCollectionConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ClientId)) + { + if (ClientId != null) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + else + { + writer.WriteNull("clientId"); + } + } + if (Optional.IsDefined(DataCollectionMode)) + { + writer.WritePropertyName("dataCollectionMode"u8); + writer.WriteStringValue(DataCollectionMode.Value.ToString()); + } + if (Optional.IsDefined(DataId)) + { + if (DataId != null) + { + writer.WritePropertyName("dataId"u8); + writer.WriteStringValue(DataId); + } + else + { + writer.WriteNull("dataId"); + } + } + if (Optional.IsDefined(SamplingRate)) + { + writer.WritePropertyName("samplingRate"u8); + writer.WriteNumberValue(SamplingRate.Value); + } + writer.WriteEndObject(); + } + + internal static DataCollectionConfiguration DeserializeDataCollectionConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional clientId = default; + Optional dataCollectionMode = default; + Optional dataId = default; + Optional samplingRate = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + clientId = null; + continue; + } + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataCollectionMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataCollectionMode = new DataCollectionMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataId = null; + continue; + } + dataId = property.Value.GetString(); + continue; + } + if (property.NameEquals("samplingRate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + samplingRate = property.Value.GetDouble(); + continue; + } + } + return new DataCollectionConfiguration(clientId.Value, Optional.ToNullable(dataCollectionMode), dataId.Value, Optional.ToNullable(samplingRate)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs new file mode 100644 index 0000000000000..e8afda44573c0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DataCollectionConfiguration. + public partial class DataCollectionConfiguration + { + /// Initializes a new instance of DataCollectionConfiguration. + public DataCollectionConfiguration() + { + } + + /// Initializes a new instance of DataCollectionConfiguration. + /// The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. + /// Enable or disable data collection. + /// The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage. + /// The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + internal DataCollectionConfiguration(string clientId, DataCollectionMode? dataCollectionMode, string dataId, double? samplingRate) + { + ClientId = clientId; + DataCollectionMode = dataCollectionMode; + DataId = dataId; + SamplingRate = samplingRate; + } + + /// The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. + public string ClientId { get; set; } + /// Enable or disable data collection. + public DataCollectionMode? DataCollectionMode { get; set; } + /// The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage. + public string DataId { get; set; } + /// The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + public double? SamplingRate { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionMode.cs new file mode 100644 index 0000000000000..e44da5855cc17 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DataCollectionMode. + public readonly partial struct DataCollectionMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataCollectionMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static DataCollectionMode Enabled { get; } = new DataCollectionMode(EnabledValue); + /// Disabled. + public static DataCollectionMode Disabled { get; } = new DataCollectionMode(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(DataCollectionMode left, DataCollectionMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataCollectionMode left, DataCollectionMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataCollectionMode(string value) => new DataCollectionMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataCollectionMode other && Equals(other); + /// + public bool Equals(DataCollectionMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs new file mode 100644 index 0000000000000..fbfcf93afc166 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataCollector : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("collections"u8); + writer.WriteStartObject(); + foreach (var item in Collections) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + if (Optional.IsDefined(RequestLogging)) + { + if (RequestLogging != null) + { + writer.WritePropertyName("requestLogging"u8); + writer.WriteObjectValue(RequestLogging); + } + else + { + writer.WriteNull("requestLogging"); + } + } + if (Optional.IsDefined(RollingRate)) + { + writer.WritePropertyName("rollingRate"u8); + writer.WriteStringValue(RollingRate.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static DataCollector DeserializeDataCollector(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary collections = default; + Optional requestLogging = default; + Optional rollingRate = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("collections"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DataCollectionConfiguration.DeserializeDataCollectionConfiguration(property0.Value)); + } + collections = dictionary; + continue; + } + if (property.NameEquals("requestLogging"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + requestLogging = null; + continue; + } + requestLogging = RequestLogging.DeserializeRequestLogging(property.Value); + continue; + } + if (property.NameEquals("rollingRate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rollingRate = new RollingRateType(property.Value.GetString()); + continue; + } + } + return new DataCollector(collections, requestLogging.Value, Optional.ToNullable(rollingRate)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs new file mode 100644 index 0000000000000..adba2b1480a8c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DataCollector. + public partial class DataCollector + { + /// Initializes a new instance of DataCollector. + /// + /// [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. + /// Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. + /// + /// is null. + public DataCollector(IDictionary collections) + { + Argument.AssertNotNull(collections, nameof(collections)); + + Collections = collections; + } + + /// Initializes a new instance of DataCollector. + /// + /// [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. + /// Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. + /// + /// The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. + /// + /// When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. + /// If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + /// If it's day, all data will be collected in blob path /yyyy/MM/dd/. + /// The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. + /// + internal DataCollector(IDictionary collections, RequestLogging requestLogging, RollingRateType? rollingRate) + { + Collections = collections; + RequestLogging = requestLogging; + RollingRate = rollingRate; + } + + /// + /// [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. + /// Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. + /// + public IDictionary Collections { get; } + /// The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. + internal RequestLogging RequestLogging { get; set; } + /// For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload. + public IList RequestLoggingCaptureHeaders + { + get => RequestLogging is null ? default : RequestLogging.CaptureHeaders; + set + { + if (RequestLogging is null) + RequestLogging = new RequestLogging(); + RequestLogging.CaptureHeaders = value; + } + } + + /// + /// When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. + /// If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + /// If it's day, all data will be collected in blob path /yyyy/MM/dd/. + /// The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. + /// + public RollingRateType? RollingRate { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..4edeb10dbf6a4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataDriftMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static DataDriftMetricThresholdBase DeserializeDataDriftMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("dataType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Categorical": return CategoricalDataDriftMetricThreshold.DeserializeCategoricalDataDriftMetricThreshold(element); + case "Numerical": return NumericalDataDriftMetricThreshold.DeserializeNumericalDataDriftMetricThreshold(element); + } + } + return UnknownDataDriftMetricThresholdBase.DeserializeUnknownDataDriftMetricThresholdBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.cs new file mode 100644 index 0000000000000..066b5f8728d98 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMetricThresholdBase.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The DataDriftMetricThresholdBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataDriftMetricThresholdBase + { + /// Initializes a new instance of DataDriftMetricThresholdBase. + protected DataDriftMetricThresholdBase() + { + } + + /// Initializes a new instance of DataDriftMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal DataDriftMetricThresholdBase(MonitoringFeatureDataType dataType, MonitoringThreshold threshold) + { + DataType = dataType; + Threshold = threshold; + } + + /// [Required] Specifies the data type of the metric threshold. + internal MonitoringFeatureDataType DataType { get; set; } + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs new file mode 100644 index 0000000000000..672b3f3e7dc1d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataDriftMonitoringSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DataSegment)) + { + if (DataSegment != null) + { + writer.WritePropertyName("dataSegment"u8); + writer.WriteObjectValue(DataSegment); + } + else + { + writer.WriteNull("dataSegment"); + } + } + if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) + { + if (FeatureDataTypeOverride != null) + { + writer.WritePropertyName("featureDataTypeOverride"u8); + writer.WriteStartObject(); + foreach (var item in FeatureDataTypeOverride) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value.ToString()); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("featureDataTypeOverride"); + } + } + if (Optional.IsDefined(Features)) + { + if (Features != null) + { + writer.WritePropertyName("features"u8); + writer.WriteObjectValue(Features); + } + else + { + writer.WriteNull("features"); + } + } + writer.WritePropertyName("metricThresholds"u8); + writer.WriteStartArray(); + foreach (var item in MetricThresholds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("productionData"u8); + writer.WriteObjectValue(ProductionData); + writer.WritePropertyName("referenceData"u8); + writer.WriteObjectValue(ReferenceData); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static DataDriftMonitoringSignal DeserializeDataDriftMonitoringSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional dataSegment = default; + Optional> featureDataTypeOverride = default; + Optional features = default; + IList metricThresholds = default; + MonitoringInputDataBase productionData = default; + MonitoringInputDataBase referenceData = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataSegment"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataSegment = null; + continue; + } + dataSegment = MonitoringDataSegment.DeserializeMonitoringDataSegment(property.Value); + continue; + } + if (property.NameEquals("featureDataTypeOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureDataTypeOverride = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); + } + featureDataTypeOverride = dictionary; + continue; + } + if (property.NameEquals("features"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + features = null; + continue; + } + features = MonitoringFeatureFilterBase.DeserializeMonitoringFeatureFilterBase(property.Value); + continue; + } + if (property.NameEquals("metricThresholds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataDriftMetricThresholdBase.DeserializeDataDriftMetricThresholdBase(item)); + } + metricThresholds = array; + continue; + } + if (property.NameEquals("productionData"u8)) + { + productionData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("referenceData"u8)) + { + referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new DataDriftMonitoringSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, dataSegment.Value, Optional.ToDictionary(featureDataTypeOverride), features.Value, metricThresholds, productionData, referenceData); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs new file mode 100644 index 0000000000000..1e7bd656421bb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DataDriftMonitoringSignal. + public partial class DataDriftMonitoringSignal : MonitoringSignalBase + { + /// Initializes a new instance of DataDriftMonitoringSignal. + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// , or is null. + public DataDriftMonitoringSignal(IEnumerable metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) + { + Argument.AssertNotNull(metricThresholds, nameof(metricThresholds)); + Argument.AssertNotNull(productionData, nameof(productionData)); + Argument.AssertNotNull(referenceData, nameof(referenceData)); + + FeatureDataTypeOverride = new ChangeTrackingDictionary(); + MetricThresholds = metricThresholds.ToList(); + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = MonitoringSignalType.DataDrift; + } + + /// Initializes a new instance of DataDriftMonitoringSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// The data segment used for scoping on a subset of the data population. + /// A dictionary that maps feature names to their respective data types. + /// + /// The feature filter which identifies which feature to calculate drift over. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal DataDriftMonitoringSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, MonitoringDataSegment dataSegment, IDictionary featureDataTypeOverride, MonitoringFeatureFilterBase features, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) : base(mode, properties, signalType) + { + DataSegment = dataSegment; + FeatureDataTypeOverride = featureDataTypeOverride; + Features = features; + MetricThresholds = metricThresholds; + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = signalType; + } + + /// The data segment used for scoping on a subset of the data population. + public MonitoringDataSegment DataSegment { get; set; } + /// A dictionary that maps feature names to their respective data types. + public IDictionary FeatureDataTypeOverride { get; set; } + /// + /// The feature filter which identifies which feature to calculate drift over. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringFeatureFilterBase Features { get; set; } + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public IList MetricThresholds { get; } + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ProductionData { get; set; } + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ReferenceData { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.Serialization.cs new file mode 100644 index 0000000000000..3745196fc9a4d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.Serialization.cs @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataImport : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + if (AssetName != null) + { + writer.WritePropertyName("assetName"u8); + writer.WriteStringValue(AssetName); + } + else + { + writer.WriteNull("assetName"); + } + } + if (Optional.IsDefined(Source)) + { + if (Source != null) + { + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source); + } + else + { + writer.WriteNull("source"); + } + } + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + writer.WritePropertyName("dataUri"u8); + writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static DataImport DeserializeDataImport(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional assetName = default; + Optional source = default; + MachineLearningDataType dataType = default; + Uri dataUri = default; + Optional intellectualProperty = default; + Optional stage = default; + Optional autoDeleteSetting = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetName = null; + continue; + } + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + source = null; + continue; + } + source = DataImportSource.DeserializeDataImportSource(property.Value); + continue; + } + if (property.NameEquals("dataType"u8)) + { + dataType = new MachineLearningDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataUri"u8)) + { + dataUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } + if (property.NameEquals("isAnonymous"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new DataImport(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, intellectualProperty.Value, stage.Value, assetName.Value, source.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.cs new file mode 100644 index 0000000000000..4bccc64724358 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImport.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DataImport. + public partial class DataImport : MachineLearningDataVersionProperties + { + /// Initializes a new instance of DataImport. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// is null. + public DataImport(Uri dataUri) : base(dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + DataType = MachineLearningDataType.UriFolder; + } + + /// Initializes a new instance of DataImport. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// [Required] Specifies the type of data. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Intellectual Property details. Used if data is an Intellectual Property. + /// Stage in the data lifecycle assigned to this data asset. + /// Name of the asset for data import job to create. + /// + /// Source data of the asset to import from + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + internal DataImport(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IntellectualProperty intellectualProperty, string stage, string assetName, DataImportSource source) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, dataType, dataUri, intellectualProperty, stage) + { + AssetName = assetName; + Source = source; + DataType = dataType; + } + + /// Name of the asset for data import job to create. + public string AssetName { get; set; } + /// + /// Source data of the asset to import from + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataImportSource Source { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.Serialization.cs new file mode 100644 index 0000000000000..e0570377e5e94 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataImportSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Connection)) + { + if (Connection != null) + { + writer.WritePropertyName("connection"u8); + writer.WriteStringValue(Connection); + } + else + { + writer.WriteNull("connection"); + } + } + writer.WritePropertyName("sourceType"u8); + writer.WriteStringValue(SourceType.ToString()); + writer.WriteEndObject(); + } + + internal static DataImportSource DeserializeDataImportSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("sourceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "database": return DatabaseSource.DeserializeDatabaseSource(element); + case "file_system": return FileSystemSource.DeserializeFileSystemSource(element); + } + } + return UnknownDataImportSource.DeserializeUnknownDataImportSource(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.cs new file mode 100644 index 0000000000000..f0150d675da32 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The DataImportSource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataImportSource + { + /// Initializes a new instance of DataImportSource. + protected DataImportSource() + { + } + + /// Initializes a new instance of DataImportSource. + /// Workspace connection for data import source storage. + /// [Required] Specifies the type of data. + internal DataImportSource(string connection, DataImportSourceType sourceType) + { + Connection = connection; + SourceType = sourceType; + } + + /// Workspace connection for data import source storage. + public string Connection { get; set; } + /// [Required] Specifies the type of data. + internal DataImportSourceType SourceType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSourceType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSourceType.cs new file mode 100644 index 0000000000000..22bde726ce7f7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataImportSourceType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine the type of data. + internal readonly partial struct DataImportSourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataImportSourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DatabaseValue = "database"; + private const string FileSystemValue = "file_system"; + + /// database. + public static DataImportSourceType Database { get; } = new DataImportSourceType(DatabaseValue); + /// file_system. + public static DataImportSourceType FileSystem { get; } = new DataImportSourceType(FileSystemValue); + /// Determines if two values are the same. + public static bool operator ==(DataImportSourceType left, DataImportSourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataImportSourceType left, DataImportSourceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataImportSourceType(string value) => new DataImportSourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataImportSourceType other && Equals(other); + /// + public bool Equals(DataImportSourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..a492ce548f85a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataQualityMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static DataQualityMetricThresholdBase DeserializeDataQualityMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("dataType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Categorical": return CategoricalDataQualityMetricThreshold.DeserializeCategoricalDataQualityMetricThreshold(element); + case "Numerical": return NumericalDataQualityMetricThreshold.DeserializeNumericalDataQualityMetricThreshold(element); + } + } + return UnknownDataQualityMetricThresholdBase.DeserializeUnknownDataQualityMetricThresholdBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.cs new file mode 100644 index 0000000000000..6e2b38dfa69b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMetricThresholdBase.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The DataQualityMetricThresholdBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataQualityMetricThresholdBase + { + /// Initializes a new instance of DataQualityMetricThresholdBase. + protected DataQualityMetricThresholdBase() + { + } + + /// Initializes a new instance of DataQualityMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal DataQualityMetricThresholdBase(MonitoringFeatureDataType dataType, MonitoringThreshold threshold) + { + DataType = dataType; + Threshold = threshold; + } + + /// [Required] Specifies the data type of the metric threshold. + internal MonitoringFeatureDataType DataType { get; set; } + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs new file mode 100644 index 0000000000000..1ddee77bb6363 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DataQualityMonitoringSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) + { + if (FeatureDataTypeOverride != null) + { + writer.WritePropertyName("featureDataTypeOverride"u8); + writer.WriteStartObject(); + foreach (var item in FeatureDataTypeOverride) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value.ToString()); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("featureDataTypeOverride"); + } + } + if (Optional.IsDefined(Features)) + { + if (Features != null) + { + writer.WritePropertyName("features"u8); + writer.WriteObjectValue(Features); + } + else + { + writer.WriteNull("features"); + } + } + writer.WritePropertyName("metricThresholds"u8); + writer.WriteStartArray(); + foreach (var item in MetricThresholds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("productionData"u8); + writer.WriteObjectValue(ProductionData); + writer.WritePropertyName("referenceData"u8); + writer.WriteObjectValue(ReferenceData); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static DataQualityMonitoringSignal DeserializeDataQualityMonitoringSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> featureDataTypeOverride = default; + Optional features = default; + IList metricThresholds = default; + MonitoringInputDataBase productionData = default; + MonitoringInputDataBase referenceData = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("featureDataTypeOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureDataTypeOverride = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); + } + featureDataTypeOverride = dictionary; + continue; + } + if (property.NameEquals("features"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + features = null; + continue; + } + features = MonitoringFeatureFilterBase.DeserializeMonitoringFeatureFilterBase(property.Value); + continue; + } + if (property.NameEquals("metricThresholds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataQualityMetricThresholdBase.DeserializeDataQualityMetricThresholdBase(item)); + } + metricThresholds = array; + continue; + } + if (property.NameEquals("productionData"u8)) + { + productionData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("referenceData"u8)) + { + referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new DataQualityMonitoringSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, Optional.ToDictionary(featureDataTypeOverride), features.Value, metricThresholds, productionData, referenceData); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs new file mode 100644 index 0000000000000..be3f84f77fb59 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DataQualityMonitoringSignal. + public partial class DataQualityMonitoringSignal : MonitoringSignalBase + { + /// Initializes a new instance of DataQualityMonitoringSignal. + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] The data produced by the production service which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// , or is null. + public DataQualityMonitoringSignal(IEnumerable metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) + { + Argument.AssertNotNull(metricThresholds, nameof(metricThresholds)); + Argument.AssertNotNull(productionData, nameof(productionData)); + Argument.AssertNotNull(referenceData, nameof(referenceData)); + + FeatureDataTypeOverride = new ChangeTrackingDictionary(); + MetricThresholds = metricThresholds.ToList(); + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = MonitoringSignalType.DataQuality; + } + + /// Initializes a new instance of DataQualityMonitoringSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// A dictionary that maps feature names to their respective data types. + /// + /// The features to calculate drift over. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] The data produced by the production service which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal DataQualityMonitoringSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, IDictionary featureDataTypeOverride, MonitoringFeatureFilterBase features, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) : base(mode, properties, signalType) + { + FeatureDataTypeOverride = featureDataTypeOverride; + Features = features; + MetricThresholds = metricThresholds; + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = signalType; + } + + /// A dictionary that maps feature names to their respective data types. + public IDictionary FeatureDataTypeOverride { get; set; } + /// + /// The features to calculate drift over. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringFeatureFilterBase Features { get; set; } + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public IList MetricThresholds { get; } + /// + /// [Required] The data produced by the production service which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ProductionData { get; set; } + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ReferenceData { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.Serialization.cs new file mode 100644 index 0000000000000..b0fb522b0f8eb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.Serialization.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DatabaseSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Query)) + { + if (Query != null) + { + writer.WritePropertyName("query"u8); + writer.WriteStringValue(Query); + } + else + { + writer.WriteNull("query"); + } + } + if (Optional.IsDefined(StoredProcedure)) + { + if (StoredProcedure != null) + { + writer.WritePropertyName("storedProcedure"u8); + writer.WriteStringValue(StoredProcedure); + } + else + { + writer.WriteNull("storedProcedure"); + } + } + if (Optional.IsCollectionDefined(StoredProcedureParams)) + { + if (StoredProcedureParams != null) + { + writer.WritePropertyName("storedProcedureParams"u8); + writer.WriteStartArray(); + foreach (var item in StoredProcedureParams) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartObject(); + foreach (var item0 in item) + { + writer.WritePropertyName(item0.Key); + writer.WriteStringValue(item0.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("storedProcedureParams"); + } + } + if (Optional.IsDefined(TableName)) + { + if (TableName != null) + { + writer.WritePropertyName("tableName"u8); + writer.WriteStringValue(TableName); + } + else + { + writer.WriteNull("tableName"); + } + } + if (Optional.IsDefined(Connection)) + { + if (Connection != null) + { + writer.WritePropertyName("connection"u8); + writer.WriteStringValue(Connection); + } + else + { + writer.WriteNull("connection"); + } + } + writer.WritePropertyName("sourceType"u8); + writer.WriteStringValue(SourceType.ToString()); + writer.WriteEndObject(); + } + + internal static DatabaseSource DeserializeDatabaseSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional query = default; + Optional storedProcedure = default; + Optional>> storedProcedureParams = default; + Optional tableName = default; + Optional connection = default; + DataImportSourceType sourceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("query"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + query = null; + continue; + } + query = property.Value.GetString(); + continue; + } + if (property.NameEquals("storedProcedure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + storedProcedure = null; + continue; + } + storedProcedure = property.Value.GetString(); + continue; + } + if (property.NameEquals("storedProcedureParams"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + storedProcedureParams = null; + continue; + } + List> array = new List>(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in item.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + array.Add(dictionary); + } + } + storedProcedureParams = array; + continue; + } + if (property.NameEquals("tableName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tableName = null; + continue; + } + tableName = property.Value.GetString(); + continue; + } + if (property.NameEquals("connection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + connection = null; + continue; + } + connection = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceType"u8)) + { + sourceType = new DataImportSourceType(property.Value.GetString()); + continue; + } + } + return new DatabaseSource(connection.Value, sourceType, query.Value, storedProcedure.Value, Optional.ToList(storedProcedureParams), tableName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.cs new file mode 100644 index 0000000000000..8041e9b511c26 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabaseSource.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DatabaseSource. + public partial class DatabaseSource : DataImportSource + { + /// Initializes a new instance of DatabaseSource. + public DatabaseSource() + { + StoredProcedureParams = new ChangeTrackingList>(); + SourceType = DataImportSourceType.Database; + } + + /// Initializes a new instance of DatabaseSource. + /// Workspace connection for data import source storage. + /// [Required] Specifies the type of data. + /// SQL Query statement for data import Database source. + /// SQL StoredProcedure on data import Database source. + /// SQL StoredProcedure parameters. + /// Name of the table on data import Database source. + internal DatabaseSource(string connection, DataImportSourceType sourceType, string query, string storedProcedure, IList> storedProcedureParams, string tableName) : base(connection, sourceType) + { + Query = query; + StoredProcedure = storedProcedure; + StoredProcedureParams = storedProcedureParams; + TableName = tableName; + SourceType = sourceType; + } + + /// SQL Query statement for data import Database source. + public string Query { get; set; } + /// SQL StoredProcedure on data import Database source. + public string StoredProcedure { get; set; } + /// SQL StoredProcedure parameters. + public IList> StoredProcedureParams { get; set; } + /// Name of the table on data import Database source. + public string TableName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.Serialization.cs new file mode 100644 index 0000000000000..fae668a8b165e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DatasetExportSummary : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.ToString()); + writer.WriteEndObject(); + } + + internal static DatasetExportSummary DeserializeDatasetExportSummary(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional labeledAssetName = default; + Optional endDateTime = default; + Optional exportedRowCount = default; + ExportFormatType format = default; + Optional labelingJobId = default; + Optional startDateTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("labeledAssetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + labeledAssetName = null; + continue; + } + labeledAssetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endDateTime = null; + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exportedRowCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + exportedRowCount = null; + continue; + } + exportedRowCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("format"u8)) + { + format = new ExportFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("labelingJobId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + labelingJobId = null; + continue; + } + labelingJobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + startDateTime = null; + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new DatasetExportSummary(Optional.ToNullable(endDateTime), Optional.ToNullable(exportedRowCount), format, labelingJobId.Value, Optional.ToNullable(startDateTime), labeledAssetName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.cs new file mode 100644 index 0000000000000..f5e887f2b58a8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatasetExportSummary.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DatasetExportSummary. + public partial class DatasetExportSummary : ExportSummary + { + /// Initializes a new instance of DatasetExportSummary. + public DatasetExportSummary() + { + Format = ExportFormatType.Dataset; + } + + /// Initializes a new instance of DatasetExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// [Required] The format of exported labels, also as the discriminator. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + /// The unique name of the labeled data asset. + internal DatasetExportSummary(DateTimeOffset? endOn, long? exportedRowCount, ExportFormatType format, string labelingJobId, DateTimeOffset? startOn, string labeledAssetName) : base(endOn, exportedRowCount, format, labelingJobId, startOn) + { + LabeledAssetName = labeledAssetName; + Format = format; + } + + /// The unique name of the labeled data asset. + public string LabeledAssetName { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs index 0f3b08b127a89..49ea2b29761e2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs @@ -26,6 +26,8 @@ public DatastoreType(string value) private const string AzureDataLakeGen1Value = "AzureDataLakeGen1"; private const string AzureDataLakeGen2Value = "AzureDataLakeGen2"; private const string AzureFileValue = "AzureFile"; + private const string HdfsValue = "Hdfs"; + private const string OneLakeValue = "OneLake"; /// AzureBlob. public static DatastoreType AzureBlob { get; } = new DatastoreType(AzureBlobValue); @@ -35,6 +37,10 @@ public DatastoreType(string value) public static DatastoreType AzureDataLakeGen2 { get; } = new DatastoreType(AzureDataLakeGen2Value); /// AzureFile. public static DatastoreType AzureFile { get; } = new DatastoreType(AzureFileValue); + /// Hdfs. + public static DatastoreType Hdfs { get; } = new DatastoreType(HdfsValue); + /// OneLake. + public static DatastoreType OneLake { get; } = new DatastoreType(OneLakeValue); /// Determines if two values are the same. public static bool operator ==(DatastoreType left, DatastoreType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs index 68ff218dc4bec..67bd94762b7f0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs @@ -25,6 +25,7 @@ public DistributionType(string value) private const string PyTorchValue = "PyTorch"; private const string TensorFlowValue = "TensorFlow"; private const string MpiValue = "Mpi"; + private const string RayValue = "Ray"; /// PyTorch. public static DistributionType PyTorch { get; } = new DistributionType(PyTorchValue); @@ -32,6 +33,8 @@ public DistributionType(string value) public static DistributionType TensorFlow { get; } = new DistributionType(TensorFlowValue); /// Mpi. public static DistributionType Mpi { get; } = new DistributionType(MpiValue); + /// Ray. + public static DistributionType Ray { get; } = new DistributionType(RayValue); /// Determines if two values are the same. public static bool operator ==(DistributionType left, DistributionType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.Serialization.cs new file mode 100644 index 0000000000000..2ac0d0c5ff990 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class DockerSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Privileged)) + { + if (Privileged != null) + { + writer.WritePropertyName("privileged"u8); + writer.WriteBooleanValue(Privileged.Value); + } + else + { + writer.WriteNull("privileged"); + } + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + + internal static DockerSetting DeserializeDockerSetting(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional privileged = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("privileged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + privileged = null; + continue; + } + privileged = property.Value.GetBoolean(); + continue; + } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new DockerSetting(Optional.ToNullable(privileged), additionalProperties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs new file mode 100644 index 0000000000000..94c1905258125 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The DockerSetting. + public partial class DockerSetting + { + /// Initializes a new instance of DockerSetting. + public DockerSetting() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DockerSetting. + /// Indicate whether container shall run in privileged or non-privileged mode. + /// Additional Properties. + internal DockerSetting(bool? privileged, IDictionary additionalProperties) + { + Privileged = privileged; + AdditionalProperties = additionalProperties; + } + + /// Indicate whether container shall run in privileged or non-privileged mode. + public bool? Privileged { get; set; } + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.Serialization.cs new file mode 100644 index 0000000000000..6767215dbffaa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class EmailMonitoringAlertNotificationSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EmailNotificationSetting)) + { + if (EmailNotificationSetting != null) + { + writer.WritePropertyName("emailNotificationSetting"u8); + writer.WriteObjectValue(EmailNotificationSetting); + } + else + { + writer.WriteNull("emailNotificationSetting"); + } + } + writer.WritePropertyName("alertNotificationType"u8); + writer.WriteStringValue(AlertNotificationType.ToString()); + writer.WriteEndObject(); + } + + internal static EmailMonitoringAlertNotificationSettings DeserializeEmailMonitoringAlertNotificationSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional emailNotificationSetting = default; + MonitoringAlertNotificationType alertNotificationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("emailNotificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + emailNotificationSetting = null; + continue; + } + emailNotificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("alertNotificationType"u8)) + { + alertNotificationType = new MonitoringAlertNotificationType(property.Value.GetString()); + continue; + } + } + return new EmailMonitoringAlertNotificationSettings(alertNotificationType, emailNotificationSetting.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.cs new file mode 100644 index 0000000000000..9e85c80d07eca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailMonitoringAlertNotificationSettings.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The EmailMonitoringAlertNotificationSettings. + public partial class EmailMonitoringAlertNotificationSettings : MonitoringAlertNotificationSettingsBase + { + /// Initializes a new instance of EmailMonitoringAlertNotificationSettings. + public EmailMonitoringAlertNotificationSettings() + { + AlertNotificationType = MonitoringAlertNotificationType.Email; + } + + /// Initializes a new instance of EmailMonitoringAlertNotificationSettings. + /// [Required] Specifies the type of signal to monitor. + /// Configuration for notification. + internal EmailMonitoringAlertNotificationSettings(MonitoringAlertNotificationType alertNotificationType, NotificationSetting emailNotificationSetting) : base(alertNotificationType) + { + EmailNotificationSetting = emailNotificationSetting; + AlertNotificationType = alertNotificationType; + } + + /// Configuration for notification. + public NotificationSetting EmailNotificationSetting { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailNotificationEnableType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailNotificationEnableType.cs new file mode 100644 index 0000000000000..8903dcb3c82b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EmailNotificationEnableType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine the email notification type. + public readonly partial struct EmailNotificationEnableType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EmailNotificationEnableType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JobCompletedValue = "JobCompleted"; + private const string JobFailedValue = "JobFailed"; + private const string JobCancelledValue = "JobCancelled"; + + /// JobCompleted. + public static EmailNotificationEnableType JobCompleted { get; } = new EmailNotificationEnableType(JobCompletedValue); + /// JobFailed. + public static EmailNotificationEnableType JobFailed { get; } = new EmailNotificationEnableType(JobFailedValue); + /// JobCancelled. + public static EmailNotificationEnableType JobCancelled { get; } = new EmailNotificationEnableType(JobCancelledValue); + /// Determines if two values are the same. + public static bool operator ==(EmailNotificationEnableType left, EmailNotificationEnableType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EmailNotificationEnableType left, EmailNotificationEnableType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EmailNotificationEnableType(string value) => new EmailNotificationEnableType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EmailNotificationEnableType other && Equals(other); + /// + public bool Equals(EmailNotificationEnableType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.Serialization.cs new file mode 100644 index 0000000000000..41e93b7229fa3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.Serialization.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class EncryptionKeyVaultUpdateProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keyIdentifier"u8); + writer.WriteStringValue(KeyIdentifier); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.cs new file mode 100644 index 0000000000000..26e840c25231d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultUpdateProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The EncryptionKeyVaultUpdateProperties. + public partial class EncryptionKeyVaultUpdateProperties + { + /// Initializes a new instance of EncryptionKeyVaultUpdateProperties. + /// + /// is null. + public EncryptionKeyVaultUpdateProperties(string keyIdentifier) + { + Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); + + KeyIdentifier = keyIdentifier; + } + + /// Gets the key identifier. + public string KeyIdentifier { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.Serialization.cs new file mode 100644 index 0000000000000..c45b7c0ab9cc2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.Serialization.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class EncryptionUpdateProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keyVaultProperties"u8); + writer.WriteObjectValue(KeyVaultProperties); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.cs new file mode 100644 index 0000000000000..6188dd2ce498b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionUpdateProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The EncryptionUpdateProperties. + public partial class EncryptionUpdateProperties + { + /// Initializes a new instance of EncryptionUpdateProperties. + /// + /// is null. + public EncryptionUpdateProperties(EncryptionKeyVaultUpdateProperties keyVaultProperties) + { + Argument.AssertNotNull(keyVaultProperties, nameof(keyVaultProperties)); + + KeyVaultProperties = keyVaultProperties; + } + + /// Gets the key vault properties. + internal EncryptionKeyVaultUpdateProperties KeyVaultProperties { get; } + /// Gets the key identifier. + public string KeyIdentifier + { + get => KeyVaultProperties?.KeyIdentifier; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.Serialization.cs new file mode 100644 index 0000000000000..1a580f709f974 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class EnvironmentVariable : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VariableType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(VariableType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + + internal static EnvironmentVariable DeserializeEnvironmentVariable(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional value = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new EnvironmentVariableType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new EnvironmentVariable(Optional.ToNullable(type), value.Value, additionalProperties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs new file mode 100644 index 0000000000000..38d87d43501f1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The EnvironmentVariable. + public partial class EnvironmentVariable + { + /// Initializes a new instance of EnvironmentVariable. + public EnvironmentVariable() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of EnvironmentVariable. + /// Type of the Environment Variable. Possible values are: local - For local variable. + /// Value of the Environment variable. + /// Additional Properties. + internal EnvironmentVariable(EnvironmentVariableType? variableType, string value, IDictionary additionalProperties) + { + VariableType = variableType; + Value = value; + AdditionalProperties = additionalProperties; + } + + /// Type of the Environment Variable. Possible values are: local - For local variable. + public EnvironmentVariableType? VariableType { get; set; } + /// Value of the Environment variable. + public string Value { get; set; } + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariableType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariableType.cs new file mode 100644 index 0000000000000..188c9440407ae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariableType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Type of the Environment Variable. Possible values are: local - For local variable. + public readonly partial struct EnvironmentVariableType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnvironmentVariableType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LocalValue = "local"; + + /// local. + public static EnvironmentVariableType Local { get; } = new EnvironmentVariableType(LocalValue); + /// Determines if two values are the same. + public static bool operator ==(EnvironmentVariableType left, EnvironmentVariableType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnvironmentVariableType left, EnvironmentVariableType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EnvironmentVariableType(string value) => new EnvironmentVariableType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnvironmentVariableType other && Equals(other); + /// + public bool Equals(EnvironmentVariableType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportFormatType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportFormatType.cs new file mode 100644 index 0000000000000..ef4c243ca2400 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportFormatType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The format of exported labels. + internal readonly partial struct ExportFormatType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExportFormatType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DatasetValue = "Dataset"; + private const string CocoValue = "Coco"; + private const string CSVValue = "CSV"; + + /// Dataset. + public static ExportFormatType Dataset { get; } = new ExportFormatType(DatasetValue); + /// Coco. + public static ExportFormatType Coco { get; } = new ExportFormatType(CocoValue); + /// CSV. + public static ExportFormatType CSV { get; } = new ExportFormatType(CSVValue); + /// Determines if two values are the same. + public static bool operator ==(ExportFormatType left, ExportFormatType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExportFormatType left, ExportFormatType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ExportFormatType(string value) => new ExportFormatType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExportFormatType other && Equals(other); + /// + public bool Equals(ExportFormatType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.Serialization.cs new file mode 100644 index 0000000000000..85559f6fb40b2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ExportSummary : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.ToString()); + writer.WriteEndObject(); + } + + internal static ExportSummary DeserializeExportSummary(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("format", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CSV": return CsvExportSummary.DeserializeCsvExportSummary(element); + case "Coco": return CocoExportSummary.DeserializeCocoExportSummary(element); + case "Dataset": return DatasetExportSummary.DeserializeDatasetExportSummary(element); + } + } + return UnknownExportSummary.DeserializeUnknownExportSummary(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.cs new file mode 100644 index 0000000000000..a43504ec0c47c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExportSummary.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The ExportSummary. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class ExportSummary + { + /// Initializes a new instance of ExportSummary. + protected ExportSummary() + { + } + + /// Initializes a new instance of ExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// [Required] The format of exported labels, also as the discriminator. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + internal ExportSummary(DateTimeOffset? endOn, long? exportedRowCount, ExportFormatType format, string labelingJobId, DateTimeOffset? startOn) + { + EndOn = endOn; + ExportedRowCount = exportedRowCount; + Format = format; + LabelingJobId = labelingJobId; + StartOn = startOn; + } + + /// The time when the export was completed. + public DateTimeOffset? EndOn { get; } + /// The total number of labeled datapoints exported. + public long? ExportedRowCount { get; } + /// [Required] The format of exported labels, also as the discriminator. + internal ExportFormatType Format { get; set; } + /// Name and identifier of the job containing exported labels. + public string LabelingJobId { get; } + /// The time when the export was requested. + public DateTimeOffset? StartOn { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs new file mode 100644 index 0000000000000..f192ca31690f3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FeatureAttributionDriftMonitoringSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metricThreshold"u8); + writer.WriteObjectValue(MetricThreshold); + writer.WritePropertyName("productionData"u8); + writer.WriteStartArray(); + foreach (var item in ProductionData) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("referenceData"u8); + writer.WriteObjectValue(ReferenceData); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static FeatureAttributionDriftMonitoringSignal DeserializeFeatureAttributionDriftMonitoringSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FeatureAttributionMetricThreshold metricThreshold = default; + IList productionData = default; + MonitoringInputDataBase referenceData = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metricThreshold"u8)) + { + metricThreshold = FeatureAttributionMetricThreshold.DeserializeFeatureAttributionMetricThreshold(property.Value); + continue; + } + if (property.NameEquals("productionData"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MonitoringInputDataBase.DeserializeMonitoringInputDataBase(item)); + } + productionData = array; + continue; + } + if (property.NameEquals("referenceData"u8)) + { + referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new FeatureAttributionDriftMonitoringSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, metricThreshold, productionData, referenceData); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs new file mode 100644 index 0000000000000..b3d7c34e48d90 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FeatureAttributionDriftMonitoringSignal. + public partial class FeatureAttributionDriftMonitoringSignal : MonitoringSignalBase + { + /// Initializes a new instance of FeatureAttributionDriftMonitoringSignal. + /// [Required] A list of metrics to calculate and their associated thresholds. + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// , or is null. + public FeatureAttributionDriftMonitoringSignal(FeatureAttributionMetricThreshold metricThreshold, IEnumerable productionData, MonitoringInputDataBase referenceData) + { + Argument.AssertNotNull(metricThreshold, nameof(metricThreshold)); + Argument.AssertNotNull(productionData, nameof(productionData)); + Argument.AssertNotNull(referenceData, nameof(referenceData)); + + MetricThreshold = metricThreshold; + ProductionData = productionData.ToList(); + ReferenceData = referenceData; + SignalType = MonitoringSignalType.FeatureAttributionDrift; + } + + /// Initializes a new instance of FeatureAttributionDriftMonitoringSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// [Required] A list of metrics to calculate and their associated thresholds. + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal FeatureAttributionDriftMonitoringSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, FeatureAttributionMetricThreshold metricThreshold, IList productionData, MonitoringInputDataBase referenceData) : base(mode, properties, signalType) + { + MetricThreshold = metricThreshold; + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = signalType; + } + + /// [Required] A list of metrics to calculate and their associated thresholds. + public FeatureAttributionMetricThreshold MetricThreshold { get; set; } + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public IList ProductionData { get; } + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ReferenceData { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetric.cs new file mode 100644 index 0000000000000..f16b9a6c05ec4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetric.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FeatureAttributionMetric. + public readonly partial struct FeatureAttributionMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FeatureAttributionMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NormalizedDiscountedCumulativeGainValue = "NormalizedDiscountedCumulativeGain"; + + /// The Normalized Discounted Cumulative Gain metric. + public static FeatureAttributionMetric NormalizedDiscountedCumulativeGain { get; } = new FeatureAttributionMetric(NormalizedDiscountedCumulativeGainValue); + /// Determines if two values are the same. + public static bool operator ==(FeatureAttributionMetric left, FeatureAttributionMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FeatureAttributionMetric left, FeatureAttributionMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FeatureAttributionMetric(string value) => new FeatureAttributionMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FeatureAttributionMetric other && Equals(other); + /// + public bool Equals(FeatureAttributionMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..5c3fd33622a57 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FeatureAttributionMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static FeatureAttributionMetricThreshold DeserializeFeatureAttributionMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FeatureAttributionMetric metric = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new FeatureAttributionMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new FeatureAttributionMetricThreshold(metric, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs new file mode 100644 index 0000000000000..ef4aa64286448 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FeatureAttributionMetricThreshold. + public partial class FeatureAttributionMetricThreshold + { + /// Initializes a new instance of FeatureAttributionMetricThreshold. + /// [Required] The feature attribution metric to calculate. + public FeatureAttributionMetricThreshold(FeatureAttributionMetric metric) + { + Metric = metric; + } + + /// Initializes a new instance of FeatureAttributionMetricThreshold. + /// [Required] The feature attribution metric to calculate. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal FeatureAttributionMetricThreshold(FeatureAttributionMetric metric, MonitoringThreshold threshold) + { + Metric = metric; + Threshold = threshold; + } + + /// [Required] The feature attribution metric to calculate. + public FeatureAttributionMetric Metric { get; set; } + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureDataType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureDataType.cs new file mode 100644 index 0000000000000..5d286af8c7911 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureDataType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FeatureDataType. + public readonly partial struct FeatureDataType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FeatureDataType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StringValue = "String"; + private const string IntegerValue = "Integer"; + private const string LongValue = "Long"; + private const string FloatValue = "Float"; + private const string DoubleValue = "Double"; + private const string BinaryValue = "Binary"; + private const string DatetimeValue = "Datetime"; + private const string BooleanValue = "Boolean"; + + /// String. + public static FeatureDataType String { get; } = new FeatureDataType(StringValue); + /// Integer. + public static FeatureDataType Integer { get; } = new FeatureDataType(IntegerValue); + /// Long. + public static FeatureDataType Long { get; } = new FeatureDataType(LongValue); + /// Float. + public static FeatureDataType Float { get; } = new FeatureDataType(FloatValue); + /// Double. + public static FeatureDataType Double { get; } = new FeatureDataType(DoubleValue); + /// Binary. + public static FeatureDataType Binary { get; } = new FeatureDataType(BinaryValue); + /// Datetime. + public static FeatureDataType Datetime { get; } = new FeatureDataType(DatetimeValue); + /// Boolean. + public static FeatureDataType Boolean { get; } = new FeatureDataType(BooleanValue); + /// Determines if two values are the same. + public static bool operator ==(FeatureDataType left, FeatureDataType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FeatureDataType left, FeatureDataType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FeatureDataType(string value) => new FeatureDataType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FeatureDataType other && Equals(other); + /// + public bool Equals(FeatureDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..ea538c605f73e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class FeatureResourceArmPaginatedResult + { + internal static FeatureResourceArmPaginatedResult DeserializeFeatureResourceArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFeatureData.DeserializeMachineLearningFeatureData(item)); + } + value = array; + continue; + } + } + return new FeatureResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs new file mode 100644 index 0000000000000..ae97c88090a48 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of Feature entities. + internal partial class FeatureResourceArmPaginatedResult + { + /// Initializes a new instance of FeatureResourceArmPaginatedResult. + internal FeatureResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of FeatureResourceArmPaginatedResult. + /// The link to the next page of Feature objects. If null, there are no additional pages. + /// An array of objects of type Feature. + internal FeatureResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of Feature objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type Feature. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs new file mode 100644 index 0000000000000..7d2b24c8bad5d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FeatureSetVersionBackfillContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(FeatureWindow)) + { + if (FeatureWindow != null) + { + writer.WritePropertyName("featureWindow"u8); + writer.WriteObjectValue(FeatureWindow); + } + else + { + writer.WriteNull("featureWindow"); + } + } + if (Optional.IsDefined(Resource)) + { + writer.WritePropertyName("resource"u8); + writer.WriteObjectValue(Resource); + } + if (Optional.IsCollectionDefined(SparkConfiguration)) + { + writer.WritePropertyName("sparkConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SparkConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs new file mode 100644 index 0000000000000..72a24a2c43111 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Request payload for creating a backfill request for a given feature set version. + public partial class FeatureSetVersionBackfillContent + { + /// Initializes a new instance of FeatureSetVersionBackfillContent. + public FeatureSetVersionBackfillContent() + { + SparkConfiguration = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Specifies description. + public string Description { get; set; } + /// Specifies description. + public string DisplayName { get; set; } + /// Specifies the backfill feature window to be materialized. + public FeatureWindow FeatureWindow { get; set; } + /// Specifies the compute resource settings. + internal MaterializationComputeResource Resource { get; set; } + /// Specifies the instance type. + public string ResourceInstanceType + { + get => Resource is null ? default : Resource.InstanceType; + set + { + if (Resource is null) + Resource = new MaterializationComputeResource(); + Resource.InstanceType = value; + } + } + + /// Specifies the spark compute settings. + public IDictionary SparkConfiguration { get; } + /// Specifies the tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreJobType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreJobType.cs new file mode 100644 index 0000000000000..11a92eac137cb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreJobType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FeatureStoreJobType. + public readonly partial struct FeatureStoreJobType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FeatureStoreJobType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RecurrentMaterializationValue = "RecurrentMaterialization"; + private const string BackfillMaterializationValue = "BackfillMaterialization"; + + /// RecurrentMaterialization. + public static FeatureStoreJobType RecurrentMaterialization { get; } = new FeatureStoreJobType(RecurrentMaterializationValue); + /// BackfillMaterialization. + public static FeatureStoreJobType BackfillMaterialization { get; } = new FeatureStoreJobType(BackfillMaterializationValue); + /// Determines if two values are the same. + public static bool operator ==(FeatureStoreJobType left, FeatureStoreJobType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FeatureStoreJobType left, FeatureStoreJobType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FeatureStoreJobType(string value) => new FeatureStoreJobType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FeatureStoreJobType other && Equals(other); + /// + public bool Equals(FeatureStoreJobType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.Serialization.cs new file mode 100644 index 0000000000000..f0dca2d9ac96c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FeatureStoreSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ComputeRuntime)) + { + writer.WritePropertyName("computeRuntime"u8); + writer.WriteObjectValue(ComputeRuntime); + } + if (Optional.IsDefined(OfflineStoreConnectionName)) + { + writer.WritePropertyName("offlineStoreConnectionName"u8); + writer.WriteStringValue(OfflineStoreConnectionName); + } + if (Optional.IsDefined(OnlineStoreConnectionName)) + { + writer.WritePropertyName("onlineStoreConnectionName"u8); + writer.WriteStringValue(OnlineStoreConnectionName); + } + writer.WriteEndObject(); + } + + internal static FeatureStoreSettings DeserializeFeatureStoreSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional computeRuntime = default; + Optional offlineStoreConnectionName = default; + Optional onlineStoreConnectionName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeRuntime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeRuntime = ComputeRuntimeDto.DeserializeComputeRuntimeDto(property.Value); + continue; + } + if (property.NameEquals("offlineStoreConnectionName"u8)) + { + offlineStoreConnectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("onlineStoreConnectionName"u8)) + { + onlineStoreConnectionName = property.Value.GetString(); + continue; + } + } + return new FeatureStoreSettings(computeRuntime.Value, offlineStoreConnectionName.Value, onlineStoreConnectionName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs new file mode 100644 index 0000000000000..214be4047f8f0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FeatureStoreSettings. + public partial class FeatureStoreSettings + { + /// Initializes a new instance of FeatureStoreSettings. + public FeatureStoreSettings() + { + } + + /// Initializes a new instance of FeatureStoreSettings. + /// + /// + /// + internal FeatureStoreSettings(ComputeRuntimeDto computeRuntime, string offlineStoreConnectionName, string onlineStoreConnectionName) + { + ComputeRuntime = computeRuntime; + OfflineStoreConnectionName = offlineStoreConnectionName; + OnlineStoreConnectionName = onlineStoreConnectionName; + } + + /// Gets or sets the compute runtime. + internal ComputeRuntimeDto ComputeRuntime { get; set; } + /// Gets or sets the spark runtime version. + public string SparkRuntimeVersion + { + get => ComputeRuntime is null ? default : ComputeRuntime.SparkRuntimeVersion; + set + { + if (ComputeRuntime is null) + ComputeRuntime = new ComputeRuntimeDto(); + ComputeRuntime.SparkRuntimeVersion = value; + } + } + + /// Gets or sets the offline store connection name. + public string OfflineStoreConnectionName { get; set; } + /// Gets or sets the online store connection name. + public string OnlineStoreConnectionName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.Serialization.cs new file mode 100644 index 0000000000000..328a12e0dad04 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FeatureSubset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("features"u8); + writer.WriteStartArray(); + foreach (var item in Features) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("filterType"u8); + writer.WriteStringValue(FilterType.ToString()); + writer.WriteEndObject(); + } + + internal static FeatureSubset DeserializeFeatureSubset(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList features = default; + MonitoringFeatureFilterType filterType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("features"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + features = array; + continue; + } + if (property.NameEquals("filterType"u8)) + { + filterType = new MonitoringFeatureFilterType(property.Value.GetString()); + continue; + } + } + return new FeatureSubset(filterType, features); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.cs new file mode 100644 index 0000000000000..e0d119e7a4ea6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSubset.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FeatureSubset. + public partial class FeatureSubset : MonitoringFeatureFilterBase + { + /// Initializes a new instance of FeatureSubset. + /// [Required] The list of features to include. + /// is null. + public FeatureSubset(IEnumerable features) + { + Argument.AssertNotNull(features, nameof(features)); + + Features = features.ToList(); + FilterType = MonitoringFeatureFilterType.FeatureSubset; + } + + /// Initializes a new instance of FeatureSubset. + /// [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + /// [Required] The list of features to include. + internal FeatureSubset(MonitoringFeatureFilterType filterType, IList features) : base(filterType) + { + Features = features; + FilterType = filterType; + } + + /// [Required] The list of features to include. + public IList Features { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs new file mode 100644 index 0000000000000..535dc5ced4c0a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FeatureWindow : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(FeatureWindowEnd)) + { + if (FeatureWindowEnd != null) + { + writer.WritePropertyName("featureWindowEnd"u8); + writer.WriteStringValue(FeatureWindowEnd.Value, "O"); + } + else + { + writer.WriteNull("featureWindowEnd"); + } + } + if (Optional.IsDefined(FeatureWindowStart)) + { + if (FeatureWindowStart != null) + { + writer.WritePropertyName("featureWindowStart"u8); + writer.WriteStringValue(FeatureWindowStart.Value, "O"); + } + else + { + writer.WriteNull("featureWindowStart"); + } + } + writer.WriteEndObject(); + } + + internal static FeatureWindow DeserializeFeatureWindow(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional featureWindowEnd = default; + Optional featureWindowStart = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("featureWindowEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureWindowEnd = null; + continue; + } + featureWindowEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("featureWindowStart"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureWindowStart = null; + continue; + } + featureWindowStart = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new FeatureWindow(Optional.ToNullable(featureWindowEnd), Optional.ToNullable(featureWindowStart)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs new file mode 100644 index 0000000000000..2a129fa631553 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Specifies the feature window. + public partial class FeatureWindow + { + /// Initializes a new instance of FeatureWindow. + public FeatureWindow() + { + } + + /// Initializes a new instance of FeatureWindow. + /// Specifies the feature window end time. + /// Specifies the feature window start time. + internal FeatureWindow(DateTimeOffset? featureWindowEnd, DateTimeOffset? featureWindowStart) + { + FeatureWindowEnd = featureWindowEnd; + FeatureWindowStart = featureWindowStart; + } + + /// Specifies the feature window end time. + public DateTimeOffset? FeatureWindowEnd { get; set; } + /// Specifies the feature window start time. + public DateTimeOffset? FeatureWindowStart { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..de052be532c3c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class FeaturesetContainerResourceArmPaginatedResult + { + internal static FeaturesetContainerResourceArmPaginatedResult DeserializeFeaturesetContainerResourceArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFeatureSetContainerData.DeserializeMachineLearningFeatureSetContainerData(item)); + } + value = array; + continue; + } + } + return new FeaturesetContainerResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs new file mode 100644 index 0000000000000..40c3652bd6c50 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of FeaturesetContainer entities. + internal partial class FeaturesetContainerResourceArmPaginatedResult + { + /// Initializes a new instance of FeaturesetContainerResourceArmPaginatedResult. + internal FeaturesetContainerResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of FeaturesetContainerResourceArmPaginatedResult. + /// The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + /// An array of objects of type FeaturesetContainer. + internal FeaturesetContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type FeaturesetContainer. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..49d9aed067609 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class FeaturesetJobArmPaginatedResult + { + internal static FeaturesetJobArmPaginatedResult DeserializeFeaturesetJobArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFeatureSetJob.DeserializeMachineLearningFeatureSetJob(item)); + } + value = array; + continue; + } + } + return new FeaturesetJobArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.cs new file mode 100644 index 0000000000000..de34e6851f7b3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetJobArmPaginatedResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of FeaturesetJob entities. + internal partial class FeaturesetJobArmPaginatedResult + { + /// Initializes a new instance of FeaturesetJobArmPaginatedResult. + internal FeaturesetJobArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of FeaturesetJobArmPaginatedResult. + /// The link to the next page of FeaturesetJob objects. If null, there are no additional pages. + /// An array of objects of type FeaturesetJob. + internal FeaturesetJobArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of FeaturesetJob objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type FeaturesetJob. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.Serialization.cs new file mode 100644 index 0000000000000..42cc6a4a256ac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class FeaturesetSpecification : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + if (Path != null) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + else + { + writer.WriteNull("path"); + } + } + writer.WriteEndObject(); + } + + internal static FeaturesetSpecification DeserializeFeaturesetSpecification(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + path = null; + continue; + } + path = property.Value.GetString(); + continue; + } + } + return new FeaturesetSpecification(path.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.cs new file mode 100644 index 0000000000000..81ae4147bd32c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetSpecification.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing specification. + internal partial class FeaturesetSpecification + { + /// Initializes a new instance of FeaturesetSpecification. + public FeaturesetSpecification() + { + } + + /// Initializes a new instance of FeaturesetSpecification. + /// Specifies the spec path. + internal FeaturesetSpecification(string path) + { + Path = path; + } + + /// Specifies the spec path. + public string Path { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..15645e37e1698 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class FeaturesetVersionResourceArmPaginatedResult + { + internal static FeaturesetVersionResourceArmPaginatedResult DeserializeFeaturesetVersionResourceArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFeatureSetVersionData.DeserializeMachineLearningFeatureSetVersionData(item)); + } + value = array; + continue; + } + } + return new FeaturesetVersionResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs new file mode 100644 index 0000000000000..33de7a46bbc10 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of FeaturesetVersion entities. + internal partial class FeaturesetVersionResourceArmPaginatedResult + { + /// Initializes a new instance of FeaturesetVersionResourceArmPaginatedResult. + internal FeaturesetVersionResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of FeaturesetVersionResourceArmPaginatedResult. + /// The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + /// An array of objects of type FeaturesetVersion. + internal FeaturesetVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type FeaturesetVersion. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..52cefc2fa51ef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class FeaturestoreEntityContainerResourceArmPaginatedResult + { + internal static FeaturestoreEntityContainerResourceArmPaginatedResult DeserializeFeaturestoreEntityContainerResourceArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFeatureStoreEntityContainerData.DeserializeMachineLearningFeatureStoreEntityContainerData(item)); + } + value = array; + continue; + } + } + return new FeaturestoreEntityContainerResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs new file mode 100644 index 0000000000000..ee30957f9086f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of FeaturestoreEntityContainer entities. + internal partial class FeaturestoreEntityContainerResourceArmPaginatedResult + { + /// Initializes a new instance of FeaturestoreEntityContainerResourceArmPaginatedResult. + internal FeaturestoreEntityContainerResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of FeaturestoreEntityContainerResourceArmPaginatedResult. + /// The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + /// An array of objects of type FeaturestoreEntityContainer. + internal FeaturestoreEntityContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type FeaturestoreEntityContainer. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..0dc02b355b884 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class FeaturestoreEntityVersionResourceArmPaginatedResult + { + internal static FeaturestoreEntityVersionResourceArmPaginatedResult DeserializeFeaturestoreEntityVersionResourceArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFeaturestoreEntityVersionData.DeserializeMachineLearningFeaturestoreEntityVersionData(item)); + } + value = array; + continue; + } + } + return new FeaturestoreEntityVersionResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs new file mode 100644 index 0000000000000..de122d9ca5f28 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of FeaturestoreEntityVersion entities. + internal partial class FeaturestoreEntityVersionResourceArmPaginatedResult + { + /// Initializes a new instance of FeaturestoreEntityVersionResourceArmPaginatedResult. + internal FeaturestoreEntityVersionResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of FeaturestoreEntityVersionResourceArmPaginatedResult. + /// The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + /// An array of objects of type FeaturestoreEntityVersion. + internal FeaturestoreEntityVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type FeaturestoreEntityVersion. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.Serialization.cs new file mode 100644 index 0000000000000..143281f4c1a5c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.Serialization.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FileSystemSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + if (Path != null) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + else + { + writer.WriteNull("path"); + } + } + if (Optional.IsDefined(Connection)) + { + if (Connection != null) + { + writer.WritePropertyName("connection"u8); + writer.WriteStringValue(Connection); + } + else + { + writer.WriteNull("connection"); + } + } + writer.WritePropertyName("sourceType"u8); + writer.WriteStringValue(SourceType.ToString()); + writer.WriteEndObject(); + } + + internal static FileSystemSource DeserializeFileSystemSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional path = default; + Optional connection = default; + DataImportSourceType sourceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + path = null; + continue; + } + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("connection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + connection = null; + continue; + } + connection = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceType"u8)) + { + sourceType = new DataImportSourceType(property.Value.GetString()); + continue; + } + } + return new FileSystemSource(connection.Value, sourceType, path.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.cs new file mode 100644 index 0000000000000..4a34fed381774 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FileSystemSource.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The FileSystemSource. + public partial class FileSystemSource : DataImportSource + { + /// Initializes a new instance of FileSystemSource. + public FileSystemSource() + { + SourceType = DataImportSourceType.FileSystem; + } + + /// Initializes a new instance of FileSystemSource. + /// Workspace connection for data import source storage. + /// [Required] Specifies the type of data. + /// Path on data import FileSystem source. + internal FileSystemSource(string connection, DataImportSourceType sourceType, string path) : base(connection, sourceType) + { + Path = path; + SourceType = sourceType; + } + + /// Path on data import FileSystem source. + public string Path { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs new file mode 100644 index 0000000000000..941d8d51dbffd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FixedInputData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Columns)) + { + if (Columns != null) + { + writer.WritePropertyName("columns"u8); + writer.WriteStartObject(); + foreach (var item in Columns) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("columns"); + } + } + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + writer.WriteEndObject(); + } + + internal static FixedInputData DeserializeFixedInputData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> columns = default; + Optional dataContext = default; + MonitoringInputDataType inputDataType = default; + JobInputType jobInputType = default; + Uri uri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } + if (property.NameEquals("dataContext"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataContext = null; + continue; + } + dataContext = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputDataType"u8)) + { + inputDataType = new MonitoringInputDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobInputType"u8)) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } + } + return new FixedInputData(Optional.ToDictionary(columns), dataContext.Value, inputDataType, jobInputType, uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs new file mode 100644 index 0000000000000..b0338343e001d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Fixed input data definition. + public partial class FixedInputData : MonitoringInputDataBase + { + /// Initializes a new instance of FixedInputData. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + /// is null. + public FixedInputData(JobInputType jobInputType, Uri uri) : base(jobInputType, uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + InputDataType = MonitoringInputDataType.Fixed; + } + + /// Initializes a new instance of FixedInputData. + /// Mapping of column names to special uses. + /// The context metadata of the data source. + /// [Required] Specifies the type of signal to monitor. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + internal FixedInputData(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri) : base(columns, dataContext, inputDataType, jobInputType, uri) + { + InputDataType = inputDataType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs index 7dcd291ca8ba6..84435a3ff6b6e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs @@ -93,7 +93,7 @@ public ForecastingModel(string value) public static ForecastingModel SGD { get; } = new ForecastingModel(SGDValue); /// /// Random forest is a supervised learning algorithm. - /// The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. + /// The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. /// The general idea of the bagging method is that a combination of learning models increases the overall result. /// public static ForecastingModel RandomForest { get; } = new ForecastingModel(RandomForestValue); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs index 77ef47a261c68..3e484190837c9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs @@ -45,6 +45,23 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("featureLags"u8); writer.WriteStringValue(FeatureLags.Value.ToString()); } + if (Optional.IsCollectionDefined(FeaturesUnknownAtForecastTime)) + { + if (FeaturesUnknownAtForecastTime != null) + { + writer.WritePropertyName("featuresUnknownAtForecastTime"u8); + writer.WriteStartArray(); + foreach (var item in FeaturesUnknownAtForecastTime) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("featuresUnknownAtForecastTime"); + } + } if (Optional.IsDefined(ForecastHorizon)) { writer.WritePropertyName("forecastHorizon"u8); @@ -147,6 +164,7 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e Optional countryOrRegionForHolidays = default; Optional cvStepSize = default; Optional featureLags = default; + Optional> featuresUnknownAtForecastTime = default; Optional forecastHorizon = default; Optional frequency = default; Optional seasonality = default; @@ -188,6 +206,21 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e featureLags = new MachineLearningFeatureLag(property.Value.GetString()); continue; } + if (property.NameEquals("featuresUnknownAtForecastTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featuresUnknownAtForecastTime = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + featuresUnknownAtForecastTime = array; + continue; + } if (property.NameEquals("forecastHorizon"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -289,7 +322,7 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e continue; } } - return new ForecastingSettings(countryOrRegionForHolidays.Value, Optional.ToNullable(cvStepSize), Optional.ToNullable(featureLags), forecastHorizon.Value, frequency.Value, seasonality.Value, Optional.ToNullable(shortSeriesHandlingConfig), Optional.ToNullable(targetAggregateFunction), targetLags.Value, targetRollingWindowSize.Value, timeColumnName.Value, Optional.ToList(timeSeriesIdColumnNames), Optional.ToNullable(useStl)); + return new ForecastingSettings(countryOrRegionForHolidays.Value, Optional.ToNullable(cvStepSize), Optional.ToNullable(featureLags), Optional.ToList(featuresUnknownAtForecastTime), forecastHorizon.Value, frequency.Value, seasonality.Value, Optional.ToNullable(shortSeriesHandlingConfig), Optional.ToNullable(targetAggregateFunction), targetLags.Value, targetRollingWindowSize.Value, timeColumnName.Value, Optional.ToList(timeSeriesIdColumnNames), Optional.ToNullable(useStl)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs index 4d52960292da6..d1f66978cca15 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs @@ -16,6 +16,7 @@ public partial class ForecastingSettings /// Initializes a new instance of ForecastingSettings. public ForecastingSettings() { + FeaturesUnknownAtForecastTime = new ChangeTrackingList(); TimeSeriesIdColumnNames = new ChangeTrackingList(); } @@ -30,6 +31,10 @@ public ForecastingSettings() /// three days apart. /// /// Flag for generating lags for the numeric features with 'auto' or null. + /// + /// The feature columns that are available for training but unknown at the time of forecast/inference. + /// If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are known at inference time. + /// /// /// The desired maximum forecast horizon in units of time-series frequency. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -63,11 +68,12 @@ public ForecastingSettings() /// If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. /// /// Configure STL Decomposition of the time-series target column. - internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, MachineLearningFeatureLag? featureLags, ForecastHorizon forecastHorizon, string frequency, ForecastingSeasonality seasonality, MachineLearningShortSeriesHandlingConfiguration? shortSeriesHandlingConfig, TargetAggregationFunction? targetAggregateFunction, TargetLags targetLags, TargetRollingWindowSize targetRollingWindowSize, string timeColumnName, IList timeSeriesIdColumnNames, MachineLearningUseStl? useStl) + internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, MachineLearningFeatureLag? featureLags, IList featuresUnknownAtForecastTime, ForecastHorizon forecastHorizon, string frequency, ForecastingSeasonality seasonality, MachineLearningShortSeriesHandlingConfiguration? shortSeriesHandlingConfig, TargetAggregationFunction? targetAggregateFunction, TargetLags targetLags, TargetRollingWindowSize targetRollingWindowSize, string timeColumnName, IList timeSeriesIdColumnNames, MachineLearningUseStl? useStl) { CountryOrRegionForHolidays = countryOrRegionForHolidays; CvStepSize = cvStepSize; FeatureLags = featureLags; + FeaturesUnknownAtForecastTime = featuresUnknownAtForecastTime; ForecastHorizon = forecastHorizon; Frequency = frequency; Seasonality = seasonality; @@ -94,6 +100,11 @@ internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, /// Flag for generating lags for the numeric features with 'auto' or null. public MachineLearningFeatureLag? FeatureLags { get; set; } /// + /// The feature columns that are available for training but unknown at the time of forecast/inference. + /// If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are known at inference time. + /// + public IList FeaturesUnknownAtForecastTime { get; set; } + /// /// The desired maximum forecast horizon in units of time-series frequency. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs index 9f57db8fee598..b70a0b8d3e8e0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs @@ -93,6 +93,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("stackEnsembleSettings"); } } + if (Optional.IsDefined(TrainingMode)) + { + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -111,6 +116,7 @@ internal static ForecastingTrainingSettings DeserializeForecastingTrainingSettin Optional enableVoteEnsemble = default; Optional ensembleModelDownloadTimeout = default; Optional stackEnsembleSettings = default; + Optional trainingMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("allowedTrainingAlgorithms"u8)) @@ -207,8 +213,17 @@ internal static ForecastingTrainingSettings DeserializeForecastingTrainingSettin stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); continue; } + if (property.NameEquals("trainingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } } - return new ForecastingTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value, Optional.ToList(allowedTrainingAlgorithms), Optional.ToList(blockedTrainingAlgorithms)); + return new ForecastingTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value, Optional.ToNullable(trainingMode), Optional.ToList(allowedTrainingAlgorithms), Optional.ToList(blockedTrainingAlgorithms)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs index 08c2180e84b92..1075463d97a77 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs @@ -32,9 +32,14 @@ public ForecastingTrainingSettings() /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// /// Stack ensemble settings for stack ensemble run. + /// + /// TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + /// If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + /// If 'NonDistributed' then only non distributed algorithms are chosen. + /// /// Allowed models for forecasting task. /// Blocked models for forecasting task. - internal ForecastingTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings) + internal ForecastingTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, TrainingMode? trainingMode, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings, trainingMode) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs new file mode 100644 index 0000000000000..9948e84a3826f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class FqdnOutboundRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Destination)) + { + writer.WritePropertyName("destination"u8); + writer.WriteStringValue(Destination); + } + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(OutboundRuleType.ToString()); + writer.WriteEndObject(); + } + + internal static FqdnOutboundRule DeserializeFqdnOutboundRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional destination = default; + Optional category = default; + Optional status = default; + OutboundRuleType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destination"u8)) + { + destination = property.Value.GetString(); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new OutboundRuleCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new OutboundRuleStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new OutboundRuleType(property.Value.GetString()); + continue; + } + } + return new FqdnOutboundRule(Optional.ToNullable(category), Optional.ToNullable(status), type, destination.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs new file mode 100644 index 0000000000000..c557c28890b44 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// FQDN Outbound Rule for the managed network of a machine learning workspace. + public partial class FqdnOutboundRule : MachineLearningOutboundRule + { + /// Initializes a new instance of FqdnOutboundRule. + public FqdnOutboundRule() + { + OutboundRuleType = OutboundRuleType.Fqdn; + } + + /// Initializes a new instance of FqdnOutboundRule. + /// Category of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// + internal FqdnOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, string destination) : base(category, status, outboundRuleType) + { + Destination = destination; + OutboundRuleType = outboundRuleType; + } + + /// Gets or sets the destination. + public string Destination { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetric.cs new file mode 100644 index 0000000000000..a40ed69bb1e93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetric.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Generation safety quality metric enum. + public readonly partial struct GenerationSafetyQualityMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GenerationSafetyQualityMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AcceptableGroundednessScorePerInstanceValue = "AcceptableGroundednessScorePerInstance"; + private const string AggregatedGroundednessPassRateValue = "AggregatedGroundednessPassRate"; + private const string AcceptableCoherenceScorePerInstanceValue = "AcceptableCoherenceScorePerInstance"; + private const string AggregatedCoherencePassRateValue = "AggregatedCoherencePassRate"; + private const string AcceptableFluencyScorePerInstanceValue = "AcceptableFluencyScorePerInstance"; + private const string AggregatedFluencyPassRateValue = "AggregatedFluencyPassRate"; + private const string AcceptableSimilarityScorePerInstanceValue = "AcceptableSimilarityScorePerInstance"; + private const string AggregatedSimilarityPassRateValue = "AggregatedSimilarityPassRate"; + private const string AcceptableRelevanceScorePerInstanceValue = "AcceptableRelevanceScorePerInstance"; + private const string AggregatedRelevancePassRateValue = "AggregatedRelevancePassRate"; + + /// AcceptableGroundednessScorePerInstance. + public static GenerationSafetyQualityMetric AcceptableGroundednessScorePerInstance { get; } = new GenerationSafetyQualityMetric(AcceptableGroundednessScorePerInstanceValue); + /// AggregatedGroundednessPassRate. + public static GenerationSafetyQualityMetric AggregatedGroundednessPassRate { get; } = new GenerationSafetyQualityMetric(AggregatedGroundednessPassRateValue); + /// AcceptableCoherenceScorePerInstance. + public static GenerationSafetyQualityMetric AcceptableCoherenceScorePerInstance { get; } = new GenerationSafetyQualityMetric(AcceptableCoherenceScorePerInstanceValue); + /// AggregatedCoherencePassRate. + public static GenerationSafetyQualityMetric AggregatedCoherencePassRate { get; } = new GenerationSafetyQualityMetric(AggregatedCoherencePassRateValue); + /// AcceptableFluencyScorePerInstance. + public static GenerationSafetyQualityMetric AcceptableFluencyScorePerInstance { get; } = new GenerationSafetyQualityMetric(AcceptableFluencyScorePerInstanceValue); + /// AggregatedFluencyPassRate. + public static GenerationSafetyQualityMetric AggregatedFluencyPassRate { get; } = new GenerationSafetyQualityMetric(AggregatedFluencyPassRateValue); + /// AcceptableSimilarityScorePerInstance. + public static GenerationSafetyQualityMetric AcceptableSimilarityScorePerInstance { get; } = new GenerationSafetyQualityMetric(AcceptableSimilarityScorePerInstanceValue); + /// AggregatedSimilarityPassRate. + public static GenerationSafetyQualityMetric AggregatedSimilarityPassRate { get; } = new GenerationSafetyQualityMetric(AggregatedSimilarityPassRateValue); + /// AcceptableRelevanceScorePerInstance. + public static GenerationSafetyQualityMetric AcceptableRelevanceScorePerInstance { get; } = new GenerationSafetyQualityMetric(AcceptableRelevanceScorePerInstanceValue); + /// AggregatedRelevancePassRate. + public static GenerationSafetyQualityMetric AggregatedRelevancePassRate { get; } = new GenerationSafetyQualityMetric(AggregatedRelevancePassRateValue); + /// Determines if two values are the same. + public static bool operator ==(GenerationSafetyQualityMetric left, GenerationSafetyQualityMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GenerationSafetyQualityMetric left, GenerationSafetyQualityMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GenerationSafetyQualityMetric(string value) => new GenerationSafetyQualityMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GenerationSafetyQualityMetric other && Equals(other); + /// + public bool Equals(GenerationSafetyQualityMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..5c95dbfe47c41 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class GenerationSafetyQualityMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static GenerationSafetyQualityMetricThreshold DeserializeGenerationSafetyQualityMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GenerationSafetyQualityMetric metric = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new GenerationSafetyQualityMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new GenerationSafetyQualityMetricThreshold(metric, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.cs new file mode 100644 index 0000000000000..c9573ee2651e7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMetricThreshold.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Generation safety quality metric threshold definition. + public partial class GenerationSafetyQualityMetricThreshold + { + /// Initializes a new instance of GenerationSafetyQualityMetricThreshold. + /// [Required] Gets or sets the feature attribution metric to calculate. + public GenerationSafetyQualityMetricThreshold(GenerationSafetyQualityMetric metric) + { + Metric = metric; + } + + /// Initializes a new instance of GenerationSafetyQualityMetricThreshold. + /// [Required] Gets or sets the feature attribution metric to calculate. + /// + /// Gets or sets the threshold value. + /// If null, a default value will be set depending on the selected metric. + /// + internal GenerationSafetyQualityMetricThreshold(GenerationSafetyQualityMetric metric, MonitoringThreshold threshold) + { + Metric = metric; + Threshold = threshold; + } + + /// [Required] Gets or sets the feature attribution metric to calculate. + public GenerationSafetyQualityMetric Metric { get; set; } + /// + /// Gets or sets the threshold value. + /// If null, a default value will be set depending on the selected metric. + /// + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.Serialization.cs new file mode 100644 index 0000000000000..58defcc26d867 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class GenerationSafetyQualityMonitoringSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metricThresholds"u8); + writer.WriteStartArray(); + foreach (var item in MetricThresholds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(ProductionData)) + { + if (ProductionData != null) + { + writer.WritePropertyName("productionData"u8); + writer.WriteStartArray(); + foreach (var item in ProductionData) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("productionData"); + } + } + writer.WritePropertyName("samplingRate"u8); + writer.WriteNumberValue(SamplingRate); + if (Optional.IsDefined(WorkspaceConnectionId)) + { + if (WorkspaceConnectionId != null) + { + writer.WritePropertyName("workspaceConnectionId"u8); + writer.WriteStringValue(WorkspaceConnectionId); + } + else + { + writer.WriteNull("workspaceConnectionId"); + } + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static GenerationSafetyQualityMonitoringSignal DeserializeGenerationSafetyQualityMonitoringSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList metricThresholds = default; + Optional> productionData = default; + double samplingRate = default; + Optional workspaceConnectionId = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metricThresholds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GenerationSafetyQualityMetricThreshold.DeserializeGenerationSafetyQualityMetricThreshold(item)); + } + metricThresholds = array; + continue; + } + if (property.NameEquals("productionData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + productionData = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MonitoringInputDataBase.DeserializeMonitoringInputDataBase(item)); + } + productionData = array; + continue; + } + if (property.NameEquals("samplingRate"u8)) + { + samplingRate = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("workspaceConnectionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + workspaceConnectionId = null; + continue; + } + workspaceConnectionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new GenerationSafetyQualityMonitoringSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, metricThresholds, Optional.ToList(productionData), samplingRate, workspaceConnectionId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.cs new file mode 100644 index 0000000000000..0dd066021b323 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationSafetyQualityMonitoringSignal.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Generation safety quality monitoring signal definition. + public partial class GenerationSafetyQualityMonitoringSignal : MonitoringSignalBase + { + /// Initializes a new instance of GenerationSafetyQualityMonitoringSignal. + /// [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + /// [Required] The sample rate of the target data, should be greater than 0 and at most 1. + /// is null. + public GenerationSafetyQualityMonitoringSignal(IEnumerable metricThresholds, double samplingRate) + { + Argument.AssertNotNull(metricThresholds, nameof(metricThresholds)); + + MetricThresholds = metricThresholds.ToList(); + ProductionData = new ChangeTrackingList(); + SamplingRate = samplingRate; + SignalType = MonitoringSignalType.GenerationSafetyQuality; + } + + /// Initializes a new instance of GenerationSafetyQualityMonitoringSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + /// + /// Gets or sets the target data for computing metrics. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// [Required] The sample rate of the target data, should be greater than 0 and at most 1. + /// Gets or sets the workspace connection ID used to connect to the content generation endpoint. + internal GenerationSafetyQualityMonitoringSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, IList metricThresholds, IList productionData, double samplingRate, string workspaceConnectionId) : base(mode, properties, signalType) + { + MetricThresholds = metricThresholds; + ProductionData = productionData; + SamplingRate = samplingRate; + WorkspaceConnectionId = workspaceConnectionId; + SignalType = signalType; + } + + /// [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + public IList MetricThresholds { get; } + /// + /// Gets or sets the target data for computing metrics. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public IList ProductionData { get; set; } + /// [Required] The sample rate of the target data, should be greater than 0 and at most 1. + public double SamplingRate { get; set; } + /// Gets or sets the workspace connection ID used to connect to the content generation endpoint. + public string WorkspaceConnectionId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetric.cs new file mode 100644 index 0000000000000..8e0203d7c896d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetric.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Generation token statistics metric enum. + public readonly partial struct GenerationTokenStatisticsMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GenerationTokenStatisticsMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TotalTokenCountValue = "TotalTokenCount"; + private const string TotalTokenCountPerGroupValue = "TotalTokenCountPerGroup"; + + /// TotalTokenCount. + public static GenerationTokenStatisticsMetric TotalTokenCount { get; } = new GenerationTokenStatisticsMetric(TotalTokenCountValue); + /// TotalTokenCountPerGroup. + public static GenerationTokenStatisticsMetric TotalTokenCountPerGroup { get; } = new GenerationTokenStatisticsMetric(TotalTokenCountPerGroupValue); + /// Determines if two values are the same. + public static bool operator ==(GenerationTokenStatisticsMetric left, GenerationTokenStatisticsMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GenerationTokenStatisticsMetric left, GenerationTokenStatisticsMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GenerationTokenStatisticsMetric(string value) => new GenerationTokenStatisticsMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GenerationTokenStatisticsMetric other && Equals(other); + /// + public bool Equals(GenerationTokenStatisticsMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..efe94394cee77 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class GenerationTokenStatisticsMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static GenerationTokenStatisticsMetricThreshold DeserializeGenerationTokenStatisticsMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GenerationTokenStatisticsMetric metric = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new GenerationTokenStatisticsMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new GenerationTokenStatisticsMetricThreshold(metric, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.cs new file mode 100644 index 0000000000000..9488e9cba71e9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsMetricThreshold.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Generation token statistics metric threshold definition. + public partial class GenerationTokenStatisticsMetricThreshold + { + /// Initializes a new instance of GenerationTokenStatisticsMetricThreshold. + /// [Required] Gets or sets the feature attribution metric to calculate. + public GenerationTokenStatisticsMetricThreshold(GenerationTokenStatisticsMetric metric) + { + Metric = metric; + } + + /// Initializes a new instance of GenerationTokenStatisticsMetricThreshold. + /// [Required] Gets or sets the feature attribution metric to calculate. + /// + /// Gets or sets the threshold value. + /// If null, a default value will be set depending on the selected metric. + /// + internal GenerationTokenStatisticsMetricThreshold(GenerationTokenStatisticsMetric metric, MonitoringThreshold threshold) + { + Metric = metric; + Threshold = threshold; + } + + /// [Required] Gets or sets the feature attribution metric to calculate. + public GenerationTokenStatisticsMetric Metric { get; set; } + /// + /// Gets or sets the threshold value. + /// If null, a default value will be set depending on the selected metric. + /// + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.Serialization.cs new file mode 100644 index 0000000000000..790f1b2d7cae6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class GenerationTokenStatisticsSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metricThresholds"u8); + writer.WriteStartArray(); + foreach (var item in MetricThresholds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(ProductionData)) + { + if (ProductionData != null) + { + writer.WritePropertyName("productionData"u8); + writer.WriteObjectValue(ProductionData); + } + else + { + writer.WriteNull("productionData"); + } + } + writer.WritePropertyName("samplingRate"u8); + writer.WriteNumberValue(SamplingRate); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static GenerationTokenStatisticsSignal DeserializeGenerationTokenStatisticsSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList metricThresholds = default; + Optional productionData = default; + double samplingRate = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metricThresholds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GenerationTokenStatisticsMetricThreshold.DeserializeGenerationTokenStatisticsMetricThreshold(item)); + } + metricThresholds = array; + continue; + } + if (property.NameEquals("productionData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + productionData = null; + continue; + } + productionData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("samplingRate"u8)) + { + samplingRate = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new GenerationTokenStatisticsSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, metricThresholds, productionData.Value, samplingRate); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.cs new file mode 100644 index 0000000000000..0ec650209971f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GenerationTokenStatisticsSignal.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Generation token statistics signal definition. + public partial class GenerationTokenStatisticsSignal : MonitoringSignalBase + { + /// Initializes a new instance of GenerationTokenStatisticsSignal. + /// [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + /// [Required] The sample rate of the target data, should be greater than 0 and at most 1. + /// is null. + public GenerationTokenStatisticsSignal(IEnumerable metricThresholds, double samplingRate) + { + Argument.AssertNotNull(metricThresholds, nameof(metricThresholds)); + + MetricThresholds = metricThresholds.ToList(); + SamplingRate = samplingRate; + SignalType = MonitoringSignalType.GenerationTokenStatistics; + } + + /// Initializes a new instance of GenerationTokenStatisticsSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + /// + /// Gets or sets the target data for computing metrics. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// [Required] The sample rate of the target data, should be greater than 0 and at most 1. + internal GenerationTokenStatisticsSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, IList metricThresholds, MonitoringInputDataBase productionData, double samplingRate) : base(mode, properties, signalType) + { + MetricThresholds = metricThresholds; + ProductionData = productionData; + SamplingRate = samplingRate; + SignalType = signalType; + } + + /// [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + public IList MetricThresholds { get; } + /// + /// Gets or sets the target data for computing metrics. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ProductionData { get; set; } + /// [Required] The sample rate of the target data, should be greater than 0 and at most 1. + public double SamplingRate { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.Serialization.cs new file mode 100644 index 0000000000000..7150d52474d1a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.Serialization.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class HdfsDatastore : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(HdfsServerCertificate)) + { + if (HdfsServerCertificate != null) + { + writer.WritePropertyName("hdfsServerCertificate"u8); + writer.WriteStringValue(HdfsServerCertificate); + } + else + { + writer.WriteNull("hdfsServerCertificate"); + } + } + writer.WritePropertyName("nameNodeAddress"u8); + writer.WriteStringValue(NameNodeAddress); + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol); + } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("datastoreType"u8); + writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static HdfsDatastore DeserializeHdfsDatastore(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional hdfsServerCertificate = default; + string nameNodeAddress = default; + Optional protocol = default; + MachineLearningDatastoreCredentials credentials = default; + DatastoreType datastoreType = default; + Optional intellectualProperty = default; + Optional isDefault = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hdfsServerCertificate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + hdfsServerCertificate = null; + continue; + } + hdfsServerCertificate = property.Value.GetString(); + continue; + } + if (property.NameEquals("nameNodeAddress"u8)) + { + nameNodeAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol"u8)) + { + protocol = property.Value.GetString(); + continue; + } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("datastoreType"u8)) + { + datastoreType = new DatastoreType(property.Value.GetString()); + continue; + } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } + if (property.NameEquals("isDefault"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new HdfsDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, intellectualProperty.Value, Optional.ToNullable(isDefault), hdfsServerCertificate.Value, nameNodeAddress, protocol.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.cs new file mode 100644 index 0000000000000..408411a877b26 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HdfsDatastore.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The HdfsDatastore. + public partial class HdfsDatastore : MachineLearningDatastoreProperties + { + /// Initializes a new instance of HdfsDatastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// [Required] IP Address or DNS HostName. + /// or is null. + public HdfsDatastore(MachineLearningDatastoreCredentials credentials, string nameNodeAddress) : base(credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + Argument.AssertNotNull(nameNodeAddress, nameof(nameNodeAddress)); + + NameNodeAddress = nameNodeAddress; + DatastoreType = DatastoreType.Hdfs; + } + + /// Initializes a new instance of HdfsDatastore. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// [Required] Storage type backing the datastore. + /// Intellectual Property details. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. + /// [Required] IP Address or DNS HostName. + /// Protocol used to communicate with the storage account (Https/Http). + internal HdfsDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, IntellectualProperty intellectualProperty, bool? isDefault, string hdfsServerCertificate, string nameNodeAddress, string protocol) : base(description, properties, tags, credentials, datastoreType, intellectualProperty, isDefault) + { + HdfsServerCertificate = hdfsServerCertificate; + NameNodeAddress = nameNodeAddress; + Protocol = protocol; + DatastoreType = datastoreType; + } + + /// The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. + public string HdfsServerCertificate { get; set; } + /// [Required] IP Address or DNS HostName. + public string NameNodeAddress { get; set; } + /// Protocol used to communicate with the storage account (Https/Http). + public string Protocol { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.Serialization.cs new file mode 100644 index 0000000000000..1ceaddfe0c43e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class IdleShutdownSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IdleTimeBeforeShutdown)) + { + writer.WritePropertyName("idleTimeBeforeShutdown"u8); + writer.WriteStringValue(IdleTimeBeforeShutdown); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.cs new file mode 100644 index 0000000000000..e3522d9f85c78 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Stops compute instance after user defined period of inactivity. + public partial class IdleShutdownSetting + { + /// Initializes a new instance of IdleShutdownSetting. + public IdleShutdownSetting() + { + } + + /// Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + public string IdleTimeBeforeShutdown { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageAnnotationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageAnnotationType.cs new file mode 100644 index 0000000000000..1bb982ea5bddd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageAnnotationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Annotation type of image data. + public readonly partial struct ImageAnnotationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImageAnnotationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClassificationValue = "Classification"; + private const string BoundingBoxValue = "BoundingBox"; + private const string InstanceSegmentationValue = "InstanceSegmentation"; + + /// Classification. + public static ImageAnnotationType Classification { get; } = new ImageAnnotationType(ClassificationValue); + /// BoundingBox. + public static ImageAnnotationType BoundingBox { get; } = new ImageAnnotationType(BoundingBoxValue); + /// InstanceSegmentation. + public static ImageAnnotationType InstanceSegmentation { get; } = new ImageAnnotationType(InstanceSegmentationValue); + /// Determines if two values are the same. + public static bool operator ==(ImageAnnotationType left, ImageAnnotationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImageAnnotationType left, ImageAnnotationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ImageAnnotationType(string value) => new ImageAnnotationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImageAnnotationType other && Equals(other); + /// + public bool Equals(ImageAnnotationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs new file mode 100644 index 0000000000000..295881448094e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ImageMetadata + { + internal static ImageMetadata DeserializeImageMetadata(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional currentImageVersion = default; + Optional latestImageVersion = default; + Optional isLatestOSImageVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("currentImageVersion"u8)) + { + currentImageVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("latestImageVersion"u8)) + { + latestImageVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLatestOsImageVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLatestOSImageVersion = property.Value.GetBoolean(); + continue; + } + } + return new ImageMetadata(currentImageVersion.Value, latestImageVersion.Value, Optional.ToNullable(isLatestOSImageVersion)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs new file mode 100644 index 0000000000000..4979cf7589851 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Returns metadata about the operating system image for this compute instance. + public partial class ImageMetadata + { + /// Initializes a new instance of ImageMetadata. + internal ImageMetadata() + { + } + + /// Initializes a new instance of ImageMetadata. + /// Specifies the current operating system image version this compute instance is running on. + /// Specifies the latest available operating system image version. + /// Specifies whether this compute instance is running on the latest operating system image. + internal ImageMetadata(string currentImageVersion, string latestImageVersion, bool? isLatestOSImageVersion) + { + CurrentImageVersion = currentImageVersion; + LatestImageVersion = latestImageVersion; + IsLatestOSImageVersion = isLatestOSImageVersion; + } + + /// Specifies the current operating system image version this compute instance is running on. + public string CurrentImageVersion { get; } + /// Specifies the latest available operating system image version. + public string LatestImageVersion { get; } + /// Specifies whether this compute instance is running on the latest operating system image. + public bool? IsLatestOSImageVersion { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs index 21d518822ea6e..1f2bec553fde2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs @@ -11,11 +11,11 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Distribution expressions to sweep over values of model settings. /// <example> /// Some examples are: - /// <code> + /// ``` /// ModelName = "choice('seresnext', 'resnest50')"; /// LearningRate = "uniform(0.001, 0.01)"; /// LayersToFreeze = "choice(0, 2)"; - /// </code></example> + /// ```</example> /// All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) /// where distribution name can be: uniform, quniform, loguniform, etc /// For more details on how to compose distribution expressions please check the documentation: diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs index 118466fbdb89a..69c8a2d88bfee 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs @@ -11,11 +11,11 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Distribution expressions to sweep over values of model settings. /// <example> /// Some examples are: - /// <code> + /// ``` /// ModelName = "choice('seresnext', 'resnest50')"; /// LearningRate = "uniform(0.001, 0.01)"; /// LayersToFreeze = "choice(0, 2)"; - /// </code></example> + /// ```</example> /// For more details on how to compose distribution expressions please check the documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters /// For more information on the available settings please visit the official documentation: diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs index 2ec66edfd1d6b..181caac49cac9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs @@ -11,11 +11,11 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Distribution expressions to sweep over values of model settings. /// <example> /// Some examples are: - /// <code> + /// ``` /// ModelName = "choice('seresnext', 'resnest50')"; /// LearningRate = "uniform(0.001, 0.01)"; /// LayersToFreeze = "choice(0, 2)"; - /// </code></example> + /// ```</example> /// For more details on how to compose distribution expressions please check the documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters /// For more information on the available settings please visit the official documentation: diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs index b4f61c600cfac..96ed48df885aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs @@ -51,6 +51,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("imageSize"); } } + if (Optional.IsDefined(LogTrainingMetrics)) + { + writer.WritePropertyName("logTrainingMetrics"u8); + writer.WriteStringValue(LogTrainingMetrics.Value.ToString()); + } + if (Optional.IsDefined(LogValidationLoss)) + { + writer.WritePropertyName("logValidationLoss"u8); + writer.WriteStringValue(LogValidationLoss.Value.ToString()); + } if (Optional.IsDefined(MaxSize)) { if (MaxSize != null) @@ -539,6 +549,8 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO Optional boxDetectionsPerImage = default; Optional boxScoreThreshold = default; Optional imageSize = default; + Optional logTrainingMetrics = default; + Optional logValidationLoss = default; Optional maxSize = default; Optional minSize = default; Optional modelSize = default; @@ -613,6 +625,24 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO imageSize = property.Value.GetInt32(); continue; } + if (property.NameEquals("logTrainingMetrics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logTrainingMetrics = new LogTrainingMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("logValidationLoss"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logValidationLoss = new LogValidationLoss(property.Value.GetString()); + continue; + } if (property.NameEquals("maxSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1030,7 +1060,7 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO continue; } } - return new ImageModelSettingsObjectDetection(advancedSettings.Value, Optional.ToNullable(amsGradient), augmentations.Value, Optional.ToNullable(beta1), Optional.ToNullable(beta2), Optional.ToNullable(checkpointFrequency), checkpointModel.Value, checkpointRunId.Value, Optional.ToNullable(distributed), Optional.ToNullable(earlyStopping), Optional.ToNullable(earlyStoppingDelay), Optional.ToNullable(earlyStoppingPatience), Optional.ToNullable(enableOnnxNormalization), Optional.ToNullable(evaluationFrequency), Optional.ToNullable(gradientAccumulationStep), Optional.ToNullable(layersToFreeze), Optional.ToNullable(learningRate), Optional.ToNullable(learningRateScheduler), modelName.Value, Optional.ToNullable(momentum), Optional.ToNullable(nesterov), Optional.ToNullable(numberOfEpochs), Optional.ToNullable(numberOfWorkers), Optional.ToNullable(optimizer), Optional.ToNullable(randomSeed), Optional.ToNullable(stepLRGamma), Optional.ToNullable(stepLRStepSize), Optional.ToNullable(trainingBatchSize), Optional.ToNullable(validationBatchSize), Optional.ToNullable(warmupCosineLRCycles), Optional.ToNullable(warmupCosineLRWarmupEpochs), Optional.ToNullable(weightDecay), Optional.ToNullable(boxDetectionsPerImage), Optional.ToNullable(boxScoreThreshold), Optional.ToNullable(imageSize), Optional.ToNullable(maxSize), Optional.ToNullable(minSize), Optional.ToNullable(modelSize), Optional.ToNullable(multiScale), Optional.ToNullable(nmsIouThreshold), tileGridSize.Value, Optional.ToNullable(tileOverlapRatio), Optional.ToNullable(tilePredictionsNmsThreshold), Optional.ToNullable(validationIouThreshold), Optional.ToNullable(validationMetricType)); + return new ImageModelSettingsObjectDetection(advancedSettings.Value, Optional.ToNullable(amsGradient), augmentations.Value, Optional.ToNullable(beta1), Optional.ToNullable(beta2), Optional.ToNullable(checkpointFrequency), checkpointModel.Value, checkpointRunId.Value, Optional.ToNullable(distributed), Optional.ToNullable(earlyStopping), Optional.ToNullable(earlyStoppingDelay), Optional.ToNullable(earlyStoppingPatience), Optional.ToNullable(enableOnnxNormalization), Optional.ToNullable(evaluationFrequency), Optional.ToNullable(gradientAccumulationStep), Optional.ToNullable(layersToFreeze), Optional.ToNullable(learningRate), Optional.ToNullable(learningRateScheduler), modelName.Value, Optional.ToNullable(momentum), Optional.ToNullable(nesterov), Optional.ToNullable(numberOfEpochs), Optional.ToNullable(numberOfWorkers), Optional.ToNullable(optimizer), Optional.ToNullable(randomSeed), Optional.ToNullable(stepLRGamma), Optional.ToNullable(stepLRStepSize), Optional.ToNullable(trainingBatchSize), Optional.ToNullable(validationBatchSize), Optional.ToNullable(warmupCosineLRCycles), Optional.ToNullable(warmupCosineLRWarmupEpochs), Optional.ToNullable(weightDecay), Optional.ToNullable(boxDetectionsPerImage), Optional.ToNullable(boxScoreThreshold), Optional.ToNullable(imageSize), Optional.ToNullable(logTrainingMetrics), Optional.ToNullable(logValidationLoss), Optional.ToNullable(maxSize), Optional.ToNullable(minSize), Optional.ToNullable(modelSize), Optional.ToNullable(multiScale), Optional.ToNullable(nmsIouThreshold), tileGridSize.Value, Optional.ToNullable(tileOverlapRatio), Optional.ToNullable(tilePredictionsNmsThreshold), Optional.ToNullable(validationIouThreshold), Optional.ToNullable(validationMetricType)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs index 34e2314cbff02..50c1944c14569 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs @@ -84,6 +84,8 @@ public ImageModelSettingsObjectDetection() /// Note: The training run may get into CUDA OOM if the size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. /// + /// Enable computing and logging training metrics. + /// Enable computing and logging validation loss. /// /// Maximum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. @@ -121,11 +123,13 @@ public ImageModelSettingsObjectDetection() /// /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. /// Metric computation method to use for validation metrics. - internal ImageModelSettingsObjectDetection(string advancedSettings, bool? amsGradient, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, MachineLearningFlowModelJobInput checkpointModel, string checkpointRunId, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, bool? enableOnnxNormalization, int? evaluationFrequency, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, int? boxDetectionsPerImage, float? boxScoreThreshold, int? imageSize, int? maxSize, int? minSize, MachineLearningModelSize? modelSize, bool? multiScale, float? nmsIouThreshold, string tileGridSize, float? tileOverlapRatio, float? tilePredictionsNmsThreshold, float? validationIouThreshold, ValidationMetricType? validationMetricType) : base(advancedSettings, amsGradient, augmentations, beta1, beta2, checkpointFrequency, checkpointModel, checkpointRunId, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, enableOnnxNormalization, evaluationFrequency, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay) + internal ImageModelSettingsObjectDetection(string advancedSettings, bool? amsGradient, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, MachineLearningFlowModelJobInput checkpointModel, string checkpointRunId, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, bool? enableOnnxNormalization, int? evaluationFrequency, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, int? boxDetectionsPerImage, float? boxScoreThreshold, int? imageSize, LogTrainingMetric? logTrainingMetrics, LogValidationLoss? logValidationLoss, int? maxSize, int? minSize, MachineLearningModelSize? modelSize, bool? multiScale, float? nmsIouThreshold, string tileGridSize, float? tileOverlapRatio, float? tilePredictionsNmsThreshold, float? validationIouThreshold, ValidationMetricType? validationMetricType) : base(advancedSettings, amsGradient, augmentations, beta1, beta2, checkpointFrequency, checkpointModel, checkpointRunId, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, enableOnnxNormalization, evaluationFrequency, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay) { BoxDetectionsPerImage = boxDetectionsPerImage; BoxScoreThreshold = boxScoreThreshold; ImageSize = imageSize; + LogTrainingMetrics = logTrainingMetrics; + LogValidationLoss = logValidationLoss; MaxSize = maxSize; MinSize = minSize; ModelSize = modelSize; @@ -154,6 +158,10 @@ internal ImageModelSettingsObjectDetection(string advancedSettings, bool? amsGra /// Note: This settings is only supported for the 'yolov5' algorithm. /// public int? ImageSize { get; set; } + /// Enable computing and logging training metrics. + public LogTrainingMetric? LogTrainingMetrics { get; set; } + /// Enable computing and logging validation loss. + public LogValidationLoss? LogValidationLoss { get; set; } /// /// Maximum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs new file mode 100644 index 0000000000000..3a88a42f92b67 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ImageSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ImageType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ImageType.Value.ToString()); + } + if (Optional.IsDefined(Reference)) + { + writer.WritePropertyName("reference"u8); + writer.WriteStringValue(Reference); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + + internal static ImageSetting DeserializeImageSetting(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional reference = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ImageType(property.Value.GetString()); + continue; + } + if (property.NameEquals("reference"u8)) + { + reference = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ImageSetting(Optional.ToNullable(type), reference.Value, additionalProperties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs new file mode 100644 index 0000000000000..ab1be0fc18b58 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The ImageSetting. + public partial class ImageSetting + { + /// Initializes a new instance of ImageSetting. + public ImageSetting() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ImageSetting. + /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + /// Image reference URL. + /// Additional Properties. + internal ImageSetting(ImageType? imageType, string reference, IDictionary additionalProperties) + { + ImageType = imageType; + Reference = reference; + AdditionalProperties = additionalProperties; + } + + /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + public ImageType? ImageType { get; set; } + /// Image reference URL. + public string Reference { get; set; } + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs new file mode 100644 index 0000000000000..b4c9510213979 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + public readonly partial struct ImageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DockerValue = "docker"; + private const string AzureMLValue = "azureml"; + + /// docker. + public static ImageType Docker { get; } = new ImageType(DockerValue); + /// azureml. + public static ImageType AzureML { get; } = new ImageType(AzureMLValue); + /// Determines if two values are the same. + public static bool operator ==(ImageType left, ImageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImageType left, ImageType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ImageType(string value) => new ImageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImageType other && Equals(other); + /// + public bool Equals(ImageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.Serialization.cs new file mode 100644 index 0000000000000..bb23738084d4a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ImportDataAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataImportDefinition"u8); + writer.WriteObjectValue(DataImportDefinition); + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.ToString()); + writer.WriteEndObject(); + } + + internal static ImportDataAction DeserializeImportDataAction(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataImport dataImportDefinition = default; + ScheduleActionType actionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataImportDefinition"u8)) + { + dataImportDefinition = DataImport.DeserializeDataImport(property.Value); + continue; + } + if (property.NameEquals("actionType"u8)) + { + actionType = new ScheduleActionType(property.Value.GetString()); + continue; + } + } + return new ImportDataAction(actionType, dataImportDefinition); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.cs new file mode 100644 index 0000000000000..683ca9b99edbf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImportDataAction.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The ImportDataAction. + public partial class ImportDataAction : MachineLearningScheduleAction + { + /// Initializes a new instance of ImportDataAction. + /// [Required] Defines Schedule action definition details. + /// is null. + public ImportDataAction(DataImport dataImportDefinition) + { + Argument.AssertNotNull(dataImportDefinition, nameof(dataImportDefinition)); + + DataImportDefinition = dataImportDefinition; + ActionType = ScheduleActionType.ImportData; + } + + /// Initializes a new instance of ImportDataAction. + /// [Required] Specifies the action type of the schedule. + /// [Required] Defines Schedule action definition details. + internal ImportDataAction(ScheduleActionType actionType, DataImport dataImportDefinition) : base(actionType) + { + DataImportDefinition = dataImportDefinition; + ActionType = actionType; + } + + /// [Required] Defines Schedule action definition details. + public DataImport DataImportDefinition { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IncrementalDataRefresh.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IncrementalDataRefresh.cs new file mode 100644 index 0000000000000..77fa2640a64a2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IncrementalDataRefresh.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Whether IncrementalDataRefresh is enabled. + public readonly partial struct IncrementalDataRefresh : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IncrementalDataRefresh(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static IncrementalDataRefresh Enabled { get; } = new IncrementalDataRefresh(EnabledValue); + /// Disabled. + public static IncrementalDataRefresh Disabled { get; } = new IncrementalDataRefresh(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(IncrementalDataRefresh left, IncrementalDataRefresh right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IncrementalDataRefresh left, IncrementalDataRefresh right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IncrementalDataRefresh(string value) => new IncrementalDataRefresh(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IncrementalDataRefresh other && Equals(other); + /// + public bool Equals(IncrementalDataRefresh other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs new file mode 100644 index 0000000000000..15ed0fa52e9fb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class IndexColumn : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ColumnName)) + { + if (ColumnName != null) + { + writer.WritePropertyName("columnName"u8); + writer.WriteStringValue(ColumnName); + } + else + { + writer.WriteNull("columnName"); + } + } + if (Optional.IsDefined(DataType)) + { + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static IndexColumn DeserializeIndexColumn(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional columnName = default; + Optional dataType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("columnName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columnName = null; + continue; + } + columnName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataType = new FeatureDataType(property.Value.GetString()); + continue; + } + } + return new IndexColumn(columnName.Value, Optional.ToNullable(dataType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs new file mode 100644 index 0000000000000..bacdf9fff6ab7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing index column. + public partial class IndexColumn + { + /// Initializes a new instance of IndexColumn. + public IndexColumn() + { + } + + /// Initializes a new instance of IndexColumn. + /// Specifies the column name. + /// Specifies the data type. + internal IndexColumn(string columnName, FeatureDataType? dataType) + { + ColumnName = columnName; + DataType = dataType; + } + + /// Specifies the column name. + public string ColumnName { get; set; } + /// Specifies the data type. + public FeatureDataType? DataType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.Serialization.cs new file mode 100644 index 0000000000000..762f49874fe30 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.Serialization.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class InferencingServer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType.ToString()); + writer.WriteEndObject(); + } + + internal static InferencingServer DeserializeInferencingServer(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("serverType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureMLBatch": return AzureMLBatchInferencingServer.DeserializeAzureMLBatchInferencingServer(element); + case "AzureMLOnline": return AzureMLOnlineInferencingServer.DeserializeAzureMLOnlineInferencingServer(element); + case "Custom": return CustomInferencingServer.DeserializeCustomInferencingServer(element); + case "Triton": return TritonInferencingServer.DeserializeTritonInferencingServer(element); + } + } + return UnknownInferencingServer.DeserializeUnknownInferencingServer(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.cs new file mode 100644 index 0000000000000..d91982d987b3a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServer.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The InferencingServer. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + public abstract partial class InferencingServer + { + /// Initializes a new instance of InferencingServer. + protected InferencingServer() + { + } + + /// Initializes a new instance of InferencingServer. + /// [Required] Inferencing server type for various targets. + internal InferencingServer(InferencingServerType serverType) + { + ServerType = serverType; + } + + /// [Required] Inferencing server type for various targets. + internal InferencingServerType ServerType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServerType.cs new file mode 100644 index 0000000000000..ba137ebc90b9f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferencingServerType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Inferencing server type for various targets. + internal readonly partial struct InferencingServerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InferencingServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureMLOnlineValue = "AzureMLOnline"; + private const string AzureMLBatchValue = "AzureMLBatch"; + private const string TritonValue = "Triton"; + private const string CustomValue = "Custom"; + + /// AzureMLOnline. + public static InferencingServerType AzureMLOnline { get; } = new InferencingServerType(AzureMLOnlineValue); + /// AzureMLBatch. + public static InferencingServerType AzureMLBatch { get; } = new InferencingServerType(AzureMLBatchValue); + /// Triton. + public static InferencingServerType Triton { get; } = new InferencingServerType(TritonValue); + /// Custom. + public static InferencingServerType Custom { get; } = new InferencingServerType(CustomValue); + /// Determines if two values are the same. + public static bool operator ==(InferencingServerType left, InferencingServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InferencingServerType left, InferencingServerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator InferencingServerType(string value) => new InferencingServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InferencingServerType other && Equals(other); + /// + public bool Equals(InferencingServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InputPathType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InputPathType.cs new file mode 100644 index 0000000000000..40a19bab205d8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InputPathType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Input path type for package inputs. + internal readonly partial struct InputPathType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InputPathType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UrlValue = "Url"; + private const string PathIdValue = "PathId"; + private const string PathVersionValue = "PathVersion"; + + /// Url. + public static InputPathType Url { get; } = new InputPathType(UrlValue); + /// PathId. + public static InputPathType PathId { get; } = new InputPathType(PathIdValue); + /// PathVersion. + public static InputPathType PathVersion { get; } = new InputPathType(PathVersionValue); + /// Determines if two values are the same. + public static bool operator ==(InputPathType left, InputPathType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InputPathType left, InputPathType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator InputPathType(string value) => new InputPathType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InputPathType other && Equals(other); + /// + public bool Equals(InputPathType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.Serialization.cs new file mode 100644 index 0000000000000..32629023bede7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class IntellectualProperty : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ProtectionLevel)) + { + writer.WritePropertyName("protectionLevel"u8); + writer.WriteStringValue(ProtectionLevel.Value.ToString()); + } + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + writer.WriteEndObject(); + } + + internal static IntellectualProperty DeserializeIntellectualProperty(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional protectionLevel = default; + string publisher = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionLevel = new IntellectualProtectionLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("publisher"u8)) + { + publisher = property.Value.GetString(); + continue; + } + } + return new IntellectualProperty(Optional.ToNullable(protectionLevel), publisher); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.cs new file mode 100644 index 0000000000000..a6575d8b926b6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProperty.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Intellectual Property details for a resource. + public partial class IntellectualProperty + { + /// Initializes a new instance of IntellectualProperty. + /// [Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name. + /// is null. + public IntellectualProperty(string publisher) + { + Argument.AssertNotNull(publisher, nameof(publisher)); + + Publisher = publisher; + } + + /// Initializes a new instance of IntellectualProperty. + /// Protection level of the Intellectual Property. + /// [Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name. + internal IntellectualProperty(IntellectualProtectionLevel? protectionLevel, string publisher) + { + ProtectionLevel = protectionLevel; + Publisher = publisher; + } + + /// Protection level of the Intellectual Property. + public IntellectualProtectionLevel? ProtectionLevel { get; set; } + /// [Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name. + public string Publisher { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProtectionLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProtectionLevel.cs new file mode 100644 index 0000000000000..9ef55583177c1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IntellectualProtectionLevel.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Protection level associated with the Intellectual Property. + public readonly partial struct IntellectualProtectionLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IntellectualProtectionLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllValue = "All"; + private const string NoneValue = "None"; + + /// All means Intellectual Property is fully protected. + public static IntellectualProtectionLevel All { get; } = new IntellectualProtectionLevel(AllValue); + /// None means it is not an Intellectual Property. + public static IntellectualProtectionLevel None { get; } = new IntellectualProtectionLevel(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(IntellectualProtectionLevel left, IntellectualProtectionLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IntellectualProtectionLevel left, IntellectualProtectionLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IntellectualProtectionLevel(string value) => new IntellectualProtectionLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IntellectualProtectionLevel other && Equals(other); + /// + public bool Equals(IntellectualProtectionLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IsolationMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IsolationMode.cs new file mode 100644 index 0000000000000..7815a3f3eea42 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IsolationMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Isolation mode for the managed network of a machine learning workspace. + public readonly partial struct IsolationMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IsolationMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string AllowInternetOutboundValue = "AllowInternetOutbound"; + private const string AllowOnlyApprovedOutboundValue = "AllowOnlyApprovedOutbound"; + + /// Disabled. + public static IsolationMode Disabled { get; } = new IsolationMode(DisabledValue); + /// AllowInternetOutbound. + public static IsolationMode AllowInternetOutbound { get; } = new IsolationMode(AllowInternetOutboundValue); + /// AllowOnlyApprovedOutbound. + public static IsolationMode AllowOnlyApprovedOutbound { get; } = new IsolationMode(AllowOnlyApprovedOutboundValue); + /// Determines if two values are the same. + public static bool operator ==(IsolationMode left, IsolationMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IsolationMode left, IsolationMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IsolationMode(string value) => new IsolationMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IsolationMode other && Equals(other); + /// + public bool Equals(IsolationMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.Serialization.cs new file mode 100644 index 0000000000000..45626b113c377 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class JobAllNodes : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("nodesValueType"u8); + writer.WriteStringValue(NodesValueType.ToString()); + writer.WriteEndObject(); + } + + internal static JobAllNodes DeserializeJobAllNodes(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NodesValueType nodesValueType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodesValueType"u8)) + { + nodesValueType = new NodesValueType(property.Value.GetString()); + continue; + } + } + return new JobAllNodes(nodesValueType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.cs new file mode 100644 index 0000000000000..ef292e4a345ce --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobAllNodes.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// All nodes means the service will be running on all of the nodes of the job. + public partial class JobAllNodes : JobNodes + { + /// Initializes a new instance of JobAllNodes. + public JobAllNodes() + { + NodesValueType = NodesValueType.All; + } + + /// Initializes a new instance of JobAllNodes. + /// [Required] Type of the Nodes value. + internal JobAllNodes(NodesValueType nodesValueType) : base(nodesValueType) + { + NodesValueType = nodesValueType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs index cbe9c2f4d0db2..2c6b09e259267 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// Enum to determine the Job Input Type. - internal readonly partial struct JobInputType : IEquatable + public readonly partial struct JobInputType : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.Serialization.cs new file mode 100644 index 0000000000000..b853059f4aa32 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class JobNodes : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("nodesValueType"u8); + writer.WriteStringValue(NodesValueType.ToString()); + writer.WriteEndObject(); + } + + internal static JobNodes DeserializeJobNodes(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("nodesValueType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "All": return JobAllNodes.DeserializeJobAllNodes(element); + } + } + return UnknownNodes.DeserializeUnknownNodes(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.cs new file mode 100644 index 0000000000000..4681353862a13 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobNodes.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Abstract Nodes definition + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class JobNodes + { + /// Initializes a new instance of JobNodes. + protected JobNodes() + { + } + + /// Initializes a new instance of JobNodes. + /// [Required] Type of the Nodes value. + internal JobNodes(NodesValueType nodesValueType) + { + NodesValueType = nodesValueType; + } + + /// [Required] Type of the Nodes value. + internal NodesValueType NodesValueType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobProvisioningState.cs new file mode 100644 index 0000000000000..fb00a784d105d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine the job provisioning state. + public readonly partial struct JobProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string InProgressValue = "InProgress"; + + /// Succeeded. + public static JobProvisioningState Succeeded { get; } = new JobProvisioningState(SucceededValue); + /// Failed. + public static JobProvisioningState Failed { get; } = new JobProvisioningState(FailedValue); + /// Canceled. + public static JobProvisioningState Canceled { get; } = new JobProvisioningState(CanceledValue); + /// InProgress. + public static JobProvisioningState InProgress { get; } = new JobProvisioningState(InProgressValue); + /// Determines if two values are the same. + public static bool operator ==(JobProvisioningState left, JobProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobProvisioningState left, JobProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator JobProvisioningState(string value) => new JobProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobProvisioningState other && Equals(other); + /// + public bool Equals(JobProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.Serialization.cs new file mode 100644 index 0000000000000..46b18b8bf4913 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class JobQueueSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(JobTier)) + { + writer.WritePropertyName("jobTier"u8); + writer.WriteStringValue(JobTier.Value.ToString()); + } + if (Optional.IsDefined(Priority)) + { + if (Priority != null) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + else + { + writer.WriteNull("priority"); + } + } + writer.WriteEndObject(); + } + + internal static JobQueueSettings DeserializeJobQueueSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional jobTier = default; + Optional priority = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobTier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobTier = new JobTier(property.Value.GetString()); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + priority = null; + continue; + } + priority = property.Value.GetInt32(); + continue; + } + } + return new JobQueueSettings(Optional.ToNullable(jobTier), Optional.ToNullable(priority)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.cs new file mode 100644 index 0000000000000..d3e61f1e96689 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobQueueSettings.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The JobQueueSettings. + public partial class JobQueueSettings + { + /// Initializes a new instance of JobQueueSettings. + public JobQueueSettings() + { + } + + /// Initializes a new instance of JobQueueSettings. + /// Controls the compute job tier. + /// Controls the priority of the job on a compute. + internal JobQueueSettings(JobTier? jobTier, int? priority) + { + JobTier = jobTier; + Priority = priority; + } + + /// Controls the compute job tier. + public JobTier? JobTier { get; set; } + /// Controls the priority of the job on a compute. + public int? Priority { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.Serialization.cs new file mode 100644 index 0000000000000..c196cd00aa710 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class JobStatusMessage + { + internal static JobStatusMessage DeserializeJobStatusMessage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional code = default; + Optional createdDateTime = default; + Optional level = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + code = null; + continue; + } + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + createdDateTime = null; + continue; + } + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("level"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + level = new JobStatusMessageLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + message = null; + continue; + } + message = property.Value.GetString(); + continue; + } + } + return new JobStatusMessage(code.Value, Optional.ToNullable(createdDateTime), Optional.ToNullable(level), message.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.cs new file mode 100644 index 0000000000000..052471b3fd452 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessage.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Active message associated with project. + public partial class JobStatusMessage + { + /// Initializes a new instance of JobStatusMessage. + internal JobStatusMessage() + { + } + + /// Initializes a new instance of JobStatusMessage. + /// Service-defined message code. + /// Time in UTC at which the message was created. + /// Severity level of message. + /// A human-readable representation of the message code. + internal JobStatusMessage(string code, DateTimeOffset? createdOn, JobStatusMessageLevel? level, string message) + { + Code = code; + CreatedOn = createdOn; + Level = level; + Message = message; + } + + /// Service-defined message code. + public string Code { get; } + /// Time in UTC at which the message was created. + public DateTimeOffset? CreatedOn { get; } + /// Severity level of message. + public JobStatusMessageLevel? Level { get; } + /// A human-readable representation of the message code. + public string Message { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessageLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessageLevel.cs new file mode 100644 index 0000000000000..b787e12114982 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatusMessageLevel.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The JobStatusMessageLevel. + public readonly partial struct JobStatusMessageLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobStatusMessageLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ErrorValue = "Error"; + private const string InformationValue = "Information"; + private const string WarningValue = "Warning"; + + /// Error. + public static JobStatusMessageLevel Error { get; } = new JobStatusMessageLevel(ErrorValue); + /// Information. + public static JobStatusMessageLevel Information { get; } = new JobStatusMessageLevel(InformationValue); + /// Warning. + public static JobStatusMessageLevel Warning { get; } = new JobStatusMessageLevel(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(JobStatusMessageLevel left, JobStatusMessageLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobStatusMessageLevel left, JobStatusMessageLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator JobStatusMessageLevel(string value) => new JobStatusMessageLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobStatusMessageLevel other && Equals(other); + /// + public bool Equals(JobStatusMessageLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobTier.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobTier.cs new file mode 100644 index 0000000000000..782b638ceecc4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobTier.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine the job tier. + public readonly partial struct JobTier : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NullValue = "Null"; + private const string SpotValue = "Spot"; + private const string BasicValue = "Basic"; + private const string StandardValue = "Standard"; + private const string PremiumValue = "Premium"; + + /// Null. + public static JobTier Null { get; } = new JobTier(NullValue); + /// Spot. + public static JobTier Spot { get; } = new JobTier(SpotValue); + /// Basic. + public static JobTier Basic { get; } = new JobTier(BasicValue); + /// Standard. + public static JobTier Standard { get; } = new JobTier(StandardValue); + /// Premium. + public static JobTier Premium { get; } = new JobTier(PremiumValue); + /// Determines if two values are the same. + public static bool operator ==(JobTier left, JobTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobTier left, JobTier right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator JobTier(string value) => new JobTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobTier other && Equals(other); + /// + public bool Equals(JobTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs index 1c2153f63efc9..a2b2177f26b7e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs @@ -24,17 +24,23 @@ public JobType(string value) private const string AutoMLValue = "AutoML"; private const string CommandValue = "Command"; + private const string LabelingValue = "Labeling"; private const string SweepValue = "Sweep"; private const string PipelineValue = "Pipeline"; + private const string SparkValue = "Spark"; /// AutoML. public static JobType AutoML { get; } = new JobType(AutoMLValue); /// Command. public static JobType Command { get; } = new JobType(CommandValue); + /// Labeling. + public static JobType Labeling { get; } = new JobType(LabelingValue); /// Sweep. public static JobType Sweep { get; } = new JobType(SweepValue); /// Pipeline. public static JobType Pipeline { get; } = new JobType(PipelineValue); + /// Spark. + public static JobType Spark { get; } = new JobType(SparkValue); /// Determines if two values are the same. public static bool operator ==(JobType left, JobType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.Serialization.cs new file mode 100644 index 0000000000000..120aee4aa2746 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class KerberosKeytabCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("secrets"u8); + writer.WriteObjectValue(Secrets); + writer.WritePropertyName("kerberosKdcAddress"u8); + writer.WriteStringValue(KerberosKdcAddress); + writer.WritePropertyName("kerberosPrincipal"u8); + writer.WriteStringValue(KerberosPrincipal); + writer.WritePropertyName("kerberosRealm"u8); + writer.WriteStringValue(KerberosRealm); + writer.WritePropertyName("credentialsType"u8); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static KerberosKeytabCredentials DeserializeKerberosKeytabCredentials(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KerberosKeytabSecrets secrets = default; + string kerberosKdcAddress = default; + string kerberosPrincipal = default; + string kerberosRealm = default; + CredentialsType credentialsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secrets"u8)) + { + secrets = KerberosKeytabSecrets.DeserializeKerberosKeytabSecrets(property.Value); + continue; + } + if (property.NameEquals("kerberosKdcAddress"u8)) + { + kerberosKdcAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("kerberosPrincipal"u8)) + { + kerberosPrincipal = property.Value.GetString(); + continue; + } + if (property.NameEquals("kerberosRealm"u8)) + { + kerberosRealm = property.Value.GetString(); + continue; + } + if (property.NameEquals("credentialsType"u8)) + { + credentialsType = new CredentialsType(property.Value.GetString()); + continue; + } + } + return new KerberosKeytabCredentials(credentialsType, secrets, kerberosKdcAddress, kerberosPrincipal, kerberosRealm); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.cs new file mode 100644 index 0000000000000..d7b4db30cec6c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabCredentials.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The KerberosKeytabCredentials. + public partial class KerberosKeytabCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of KerberosKeytabCredentials. + /// [Required] Keytab secrets. + /// [Required] IP Address or DNS HostName. + /// [Required] Kerberos Username. + /// [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. + /// , , or is null. + public KerberosKeytabCredentials(KerberosKeytabSecrets secrets, string kerberosKdcAddress, string kerberosPrincipal, string kerberosRealm) + { + Argument.AssertNotNull(secrets, nameof(secrets)); + Argument.AssertNotNull(kerberosKdcAddress, nameof(kerberosKdcAddress)); + Argument.AssertNotNull(kerberosPrincipal, nameof(kerberosPrincipal)); + Argument.AssertNotNull(kerberosRealm, nameof(kerberosRealm)); + + Secrets = secrets; + KerberosKdcAddress = kerberosKdcAddress; + KerberosPrincipal = kerberosPrincipal; + KerberosRealm = kerberosRealm; + CredentialsType = CredentialsType.KerberosKeytab; + } + + /// Initializes a new instance of KerberosKeytabCredentials. + /// [Required] Credential type used to authentication with storage. + /// [Required] Keytab secrets. + /// [Required] IP Address or DNS HostName. + /// [Required] Kerberos Username. + /// [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. + internal KerberosKeytabCredentials(CredentialsType credentialsType, KerberosKeytabSecrets secrets, string kerberosKdcAddress, string kerberosPrincipal, string kerberosRealm) : base(credentialsType) + { + Secrets = secrets; + KerberosKdcAddress = kerberosKdcAddress; + KerberosPrincipal = kerberosPrincipal; + KerberosRealm = kerberosRealm; + CredentialsType = credentialsType; + } + + /// [Required] Keytab secrets. + public KerberosKeytabSecrets Secrets { get; set; } + /// [Required] IP Address or DNS HostName. + public string KerberosKdcAddress { get; set; } + /// [Required] Kerberos Username. + public string KerberosPrincipal { get; set; } + /// [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. + public string KerberosRealm { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.Serialization.cs new file mode 100644 index 0000000000000..f4a29e2281ae8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class KerberosKeytabSecrets : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(KerberosKeytab)) + { + if (KerberosKeytab != null) + { + writer.WritePropertyName("kerberosKeytab"u8); + writer.WriteStringValue(KerberosKeytab); + } + else + { + writer.WriteNull("kerberosKeytab"); + } + } + writer.WritePropertyName("secretsType"u8); + writer.WriteStringValue(SecretsType.ToString()); + writer.WriteEndObject(); + } + + internal static KerberosKeytabSecrets DeserializeKerberosKeytabSecrets(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional kerberosKeytab = default; + SecretsType secretsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kerberosKeytab"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + kerberosKeytab = null; + continue; + } + kerberosKeytab = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretsType"u8)) + { + secretsType = new SecretsType(property.Value.GetString()); + continue; + } + } + return new KerberosKeytabSecrets(secretsType, kerberosKeytab.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.cs new file mode 100644 index 0000000000000..893108471fef6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosKeytabSecrets.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The KerberosKeytabSecrets. + public partial class KerberosKeytabSecrets : MachineLearningDatastoreSecrets + { + /// Initializes a new instance of KerberosKeytabSecrets. + public KerberosKeytabSecrets() + { + SecretsType = SecretsType.KerberosKeytab; + } + + /// Initializes a new instance of KerberosKeytabSecrets. + /// [Required] Credential type used to authentication with storage. + /// Kerberos keytab secret. + internal KerberosKeytabSecrets(SecretsType secretsType, string kerberosKeytab) : base(secretsType) + { + KerberosKeytab = kerberosKeytab; + SecretsType = secretsType; + } + + /// Kerberos keytab secret. + public string KerberosKeytab { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.Serialization.cs new file mode 100644 index 0000000000000..de54e6e8c3879 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class KerberosPasswordCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("secrets"u8); + writer.WriteObjectValue(Secrets); + writer.WritePropertyName("kerberosKdcAddress"u8); + writer.WriteStringValue(KerberosKdcAddress); + writer.WritePropertyName("kerberosPrincipal"u8); + writer.WriteStringValue(KerberosPrincipal); + writer.WritePropertyName("kerberosRealm"u8); + writer.WriteStringValue(KerberosRealm); + writer.WritePropertyName("credentialsType"u8); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static KerberosPasswordCredentials DeserializeKerberosPasswordCredentials(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KerberosPasswordSecrets secrets = default; + string kerberosKdcAddress = default; + string kerberosPrincipal = default; + string kerberosRealm = default; + CredentialsType credentialsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secrets"u8)) + { + secrets = KerberosPasswordSecrets.DeserializeKerberosPasswordSecrets(property.Value); + continue; + } + if (property.NameEquals("kerberosKdcAddress"u8)) + { + kerberosKdcAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("kerberosPrincipal"u8)) + { + kerberosPrincipal = property.Value.GetString(); + continue; + } + if (property.NameEquals("kerberosRealm"u8)) + { + kerberosRealm = property.Value.GetString(); + continue; + } + if (property.NameEquals("credentialsType"u8)) + { + credentialsType = new CredentialsType(property.Value.GetString()); + continue; + } + } + return new KerberosPasswordCredentials(credentialsType, secrets, kerberosKdcAddress, kerberosPrincipal, kerberosRealm); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.cs new file mode 100644 index 0000000000000..7884357daf5af --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordCredentials.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The KerberosPasswordCredentials. + public partial class KerberosPasswordCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of KerberosPasswordCredentials. + /// [Required] Kerberos password secrets. + /// [Required] IP Address or DNS HostName. + /// [Required] Kerberos Username. + /// [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. + /// , , or is null. + public KerberosPasswordCredentials(KerberosPasswordSecrets secrets, string kerberosKdcAddress, string kerberosPrincipal, string kerberosRealm) + { + Argument.AssertNotNull(secrets, nameof(secrets)); + Argument.AssertNotNull(kerberosKdcAddress, nameof(kerberosKdcAddress)); + Argument.AssertNotNull(kerberosPrincipal, nameof(kerberosPrincipal)); + Argument.AssertNotNull(kerberosRealm, nameof(kerberosRealm)); + + Secrets = secrets; + KerberosKdcAddress = kerberosKdcAddress; + KerberosPrincipal = kerberosPrincipal; + KerberosRealm = kerberosRealm; + CredentialsType = CredentialsType.KerberosPassword; + } + + /// Initializes a new instance of KerberosPasswordCredentials. + /// [Required] Credential type used to authentication with storage. + /// [Required] Kerberos password secrets. + /// [Required] IP Address or DNS HostName. + /// [Required] Kerberos Username. + /// [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. + internal KerberosPasswordCredentials(CredentialsType credentialsType, KerberosPasswordSecrets secrets, string kerberosKdcAddress, string kerberosPrincipal, string kerberosRealm) : base(credentialsType) + { + Secrets = secrets; + KerberosKdcAddress = kerberosKdcAddress; + KerberosPrincipal = kerberosPrincipal; + KerberosRealm = kerberosRealm; + CredentialsType = credentialsType; + } + + /// [Required] Kerberos password secrets. + public KerberosPasswordSecrets Secrets { get; set; } + /// [Required] IP Address or DNS HostName. + public string KerberosKdcAddress { get; set; } + /// [Required] Kerberos Username. + public string KerberosPrincipal { get; set; } + /// [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. + public string KerberosRealm { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.Serialization.cs new file mode 100644 index 0000000000000..36663985e1ccc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class KerberosPasswordSecrets : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(KerberosPassword)) + { + if (KerberosPassword != null) + { + writer.WritePropertyName("kerberosPassword"u8); + writer.WriteStringValue(KerberosPassword); + } + else + { + writer.WriteNull("kerberosPassword"); + } + } + writer.WritePropertyName("secretsType"u8); + writer.WriteStringValue(SecretsType.ToString()); + writer.WriteEndObject(); + } + + internal static KerberosPasswordSecrets DeserializeKerberosPasswordSecrets(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional kerberosPassword = default; + SecretsType secretsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kerberosPassword"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + kerberosPassword = null; + continue; + } + kerberosPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretsType"u8)) + { + secretsType = new SecretsType(property.Value.GetString()); + continue; + } + } + return new KerberosPasswordSecrets(secretsType, kerberosPassword.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.cs new file mode 100644 index 0000000000000..80c45d712ca48 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KerberosPasswordSecrets.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The KerberosPasswordSecrets. + public partial class KerberosPasswordSecrets : MachineLearningDatastoreSecrets + { + /// Initializes a new instance of KerberosPasswordSecrets. + public KerberosPasswordSecrets() + { + SecretsType = SecretsType.KerberosPassword; + } + + /// Initializes a new instance of KerberosPasswordSecrets. + /// [Required] Credential type used to authentication with storage. + /// Kerberos password secret. + internal KerberosPasswordSecrets(SecretsType secretsType, string kerberosPassword) : base(secretsType) + { + KerberosPassword = kerberosPassword; + SecretsType = secretsType; + } + + /// Kerberos password secret. + public string KerberosPassword { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.Serialization.cs new file mode 100644 index 0000000000000..c12499d0cd69d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.Serialization.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LabelCategory : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Classes)) + { + if (Classes != null) + { + writer.WritePropertyName("classes"u8); + writer.WriteStartObject(); + foreach (var item in Classes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("classes"); + } + } + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(MultiSelect)) + { + writer.WritePropertyName("multiSelect"u8); + writer.WriteStringValue(MultiSelect.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static LabelCategory DeserializeLabelCategory(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> classes = default; + Optional displayName = default; + Optional multiSelect = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + classes = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, LabelClass.DeserializeLabelClass(property0.Value)); + } + classes = dictionary; + continue; + } + if (property.NameEquals("displayName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multiSelect"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multiSelect = new LabelCategoryMultiSelect(property.Value.GetString()); + continue; + } + } + return new LabelCategory(Optional.ToDictionary(classes), displayName.Value, Optional.ToNullable(multiSelect)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.cs new file mode 100644 index 0000000000000..9574363a118c0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategory.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Label category definition. + public partial class LabelCategory + { + /// Initializes a new instance of LabelCategory. + public LabelCategory() + { + Classes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of LabelCategory. + /// Dictionary of label classes in this category. + /// Display name of the label category. + /// Indicates whether it is allowed to select multiple classes in this category. + internal LabelCategory(IDictionary classes, string displayName, LabelCategoryMultiSelect? multiSelect) + { + Classes = classes; + DisplayName = displayName; + MultiSelect = multiSelect; + } + + /// Dictionary of label classes in this category. + public IDictionary Classes { get; set; } + /// Display name of the label category. + public string DisplayName { get; set; } + /// Indicates whether it is allowed to select multiple classes in this category. + public LabelCategoryMultiSelect? MultiSelect { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategoryMultiSelect.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategoryMultiSelect.cs new file mode 100644 index 0000000000000..02a56aa22a788 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelCategoryMultiSelect.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Whether multiSelect is enabled. + public readonly partial struct LabelCategoryMultiSelect : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LabelCategoryMultiSelect(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static LabelCategoryMultiSelect Enabled { get; } = new LabelCategoryMultiSelect(EnabledValue); + /// Disabled. + public static LabelCategoryMultiSelect Disabled { get; } = new LabelCategoryMultiSelect(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(LabelCategoryMultiSelect left, LabelCategoryMultiSelect right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LabelCategoryMultiSelect left, LabelCategoryMultiSelect right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LabelCategoryMultiSelect(string value) => new LabelCategoryMultiSelect(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LabelCategoryMultiSelect other && Equals(other); + /// + public bool Equals(LabelCategoryMultiSelect other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.Serialization.cs new file mode 100644 index 0000000000000..c826fa157c87b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LabelClass : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsCollectionDefined(Subclasses)) + { + if (Subclasses != null) + { + writer.WritePropertyName("subclasses"u8); + writer.WriteStartObject(); + foreach (var item in Subclasses) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("subclasses"); + } + } + writer.WriteEndObject(); + } + + internal static LabelClass DeserializeLabelClass(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional displayName = default; + Optional> subclasses = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subclasses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subclasses = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DeserializeLabelClass(property0.Value)); + } + subclasses = dictionary; + continue; + } + } + return new LabelClass(displayName.Value, Optional.ToDictionary(subclasses)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.cs new file mode 100644 index 0000000000000..9aed17f09698f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelClass.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Label class definition. + public partial class LabelClass + { + /// Initializes a new instance of LabelClass. + public LabelClass() + { + Subclasses = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of LabelClass. + /// Display name of the label class. + /// Dictionary of subclasses of the label class. + internal LabelClass(string displayName, IDictionary subclasses) + { + DisplayName = displayName; + Subclasses = subclasses; + } + + /// Display name of the label class. + public string DisplayName { get; set; } + /// Dictionary of subclasses of the label class. + public IDictionary Subclasses { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.Serialization.cs new file mode 100644 index 0000000000000..c81fd5588db93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LabelingDataConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DataId)) + { + if (DataId != null) + { + writer.WritePropertyName("dataId"u8); + writer.WriteStringValue(DataId); + } + else + { + writer.WriteNull("dataId"); + } + } + if (Optional.IsDefined(IncrementalDataRefresh)) + { + writer.WritePropertyName("incrementalDataRefresh"u8); + writer.WriteStringValue(IncrementalDataRefresh.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static LabelingDataConfiguration DeserializeLabelingDataConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional dataId = default; + Optional incrementalDataRefresh = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataId = null; + continue; + } + dataId = property.Value.GetString(); + continue; + } + if (property.NameEquals("incrementalDataRefresh"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + incrementalDataRefresh = new IncrementalDataRefresh(property.Value.GetString()); + continue; + } + } + return new LabelingDataConfiguration(dataId.Value, Optional.ToNullable(incrementalDataRefresh)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.cs new file mode 100644 index 0000000000000..6e3ed06e2f77f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingDataConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Labeling data configuration definition. + public partial class LabelingDataConfiguration + { + /// Initializes a new instance of LabelingDataConfiguration. + public LabelingDataConfiguration() + { + } + + /// Initializes a new instance of LabelingDataConfiguration. + /// Resource Id of the data asset to perform labeling. + /// Indicates whether to enable incremental data refresh. + internal LabelingDataConfiguration(string dataId, IncrementalDataRefresh? incrementalDataRefresh) + { + DataId = dataId; + IncrementalDataRefresh = incrementalDataRefresh; + } + + /// Resource Id of the data asset to perform labeling. + public string DataId { get; set; } + /// Indicates whether to enable incremental data refresh. + public IncrementalDataRefresh? IncrementalDataRefresh { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.Serialization.cs new file mode 100644 index 0000000000000..24b59d035e968 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LabelingJobImageProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AnnotationType)) + { + writer.WritePropertyName("annotationType"u8); + writer.WriteStringValue(AnnotationType.Value.ToString()); + } + writer.WritePropertyName("mediaType"u8); + writer.WriteStringValue(MediaType.ToString()); + writer.WriteEndObject(); + } + + internal static LabelingJobImageProperties DeserializeLabelingJobImageProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional annotationType = default; + MediaType mediaType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("annotationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + annotationType = new ImageAnnotationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("mediaType"u8)) + { + mediaType = new MediaType(property.Value.GetString()); + continue; + } + } + return new LabelingJobImageProperties(mediaType, Optional.ToNullable(annotationType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.cs new file mode 100644 index 0000000000000..431f7cde32c24 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobImageProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Properties of a labeling job for image data. + public partial class LabelingJobImageProperties : LabelingJobMediaProperties + { + /// Initializes a new instance of LabelingJobImageProperties. + public LabelingJobImageProperties() + { + MediaType = MediaType.Image; + } + + /// Initializes a new instance of LabelingJobImageProperties. + /// [Required] Media type of the job. + /// Annotation type of image labeling job. + internal LabelingJobImageProperties(MediaType mediaType, ImageAnnotationType? annotationType) : base(mediaType) + { + AnnotationType = annotationType; + MediaType = mediaType; + } + + /// Annotation type of image labeling job. + public ImageAnnotationType? AnnotationType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.Serialization.cs new file mode 100644 index 0000000000000..a3c04501f220b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class LabelingJobInstructions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + writer.WriteEndObject(); + } + + internal static LabelingJobInstructions DeserializeLabelingJobInstructions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional uri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + } + return new LabelingJobInstructions(uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.cs new file mode 100644 index 0000000000000..3b707e1ed5f90 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobInstructions.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Instructions for labeling job. + internal partial class LabelingJobInstructions + { + /// Initializes a new instance of LabelingJobInstructions. + public LabelingJobInstructions() + { + } + + /// Initializes a new instance of LabelingJobInstructions. + /// The link to a page with detailed labeling instructions for labelers. + internal LabelingJobInstructions(Uri uri) + { + Uri = uri; + } + + /// The link to a page with detailed labeling instructions for labelers. + public Uri Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs new file mode 100644 index 0000000000000..bd98d8818512c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LabelingJobMediaProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mediaType"u8); + writer.WriteStringValue(MediaType.ToString()); + writer.WriteEndObject(); + } + + internal static LabelingJobMediaProperties DeserializeLabelingJobMediaProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("mediaType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Image": return LabelingJobImageProperties.DeserializeLabelingJobImageProperties(element); + case "Text": return LabelingJobTextProperties.DeserializeLabelingJobTextProperties(element); + } + } + return UnknownLabelingJobMediaProperties.DeserializeUnknownLabelingJobMediaProperties(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.cs new file mode 100644 index 0000000000000..5534558be3ed4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobMediaProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Properties of a labeling job + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class LabelingJobMediaProperties + { + /// Initializes a new instance of LabelingJobMediaProperties. + protected LabelingJobMediaProperties() + { + } + + /// Initializes a new instance of LabelingJobMediaProperties. + /// [Required] Media type of the job. + internal LabelingJobMediaProperties(MediaType mediaType) + { + MediaType = mediaType; + } + + /// [Required] Media type of the job. + internal MediaType MediaType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.Serialization.cs new file mode 100644 index 0000000000000..7a5791d4f4541 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.Serialization.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LabelingJobProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DataConfiguration)) + { + if (DataConfiguration != null) + { + writer.WritePropertyName("dataConfiguration"u8); + writer.WriteObjectValue(DataConfiguration); + } + else + { + writer.WriteNull("dataConfiguration"); + } + } + if (Optional.IsDefined(JobInstructions)) + { + if (JobInstructions != null) + { + writer.WritePropertyName("jobInstructions"u8); + writer.WriteObjectValue(JobInstructions); + } + else + { + writer.WriteNull("jobInstructions"); + } + } + if (Optional.IsCollectionDefined(LabelCategories)) + { + if (LabelCategories != null) + { + writer.WritePropertyName("labelCategories"u8); + writer.WriteStartObject(); + foreach (var item in LabelCategories) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("labelCategories"); + } + } + if (Optional.IsDefined(LabelingJobMediaProperties)) + { + if (LabelingJobMediaProperties != null) + { + writer.WritePropertyName("labelingJobMediaProperties"u8); + writer.WriteObjectValue(LabelingJobMediaProperties); + } + else + { + writer.WriteNull("labelingJobMediaProperties"); + } + } + if (Optional.IsDefined(MlAssistConfiguration)) + { + writer.WritePropertyName("mlAssistConfiguration"u8); + writer.WriteObjectValue(MlAssistConfiguration); + } + if (Optional.IsDefined(ComponentId)) + { + if (ComponentId != null) + { + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); + } + else + { + writer.WriteNull("componentId"); + } + } + if (Optional.IsDefined(ComputeId)) + { + if (ComputeId != null) + { + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); + } + else + { + writer.WriteNull("computeId"); + } + } + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsDefined(Identity)) + { + if (Identity != null) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity); + } + else + { + writer.WriteNull("identity"); + } + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); + } + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + if (Optional.IsCollectionDefined(SecretsConfiguration)) + { + if (SecretsConfiguration != null) + { + writer.WritePropertyName("secretsConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SecretsConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secretsConfiguration"); + } + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) + { + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("services"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static LabelingJobProperties DeserializeLabelingJobProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional createdDateTime = default; + Optional dataConfiguration = default; + Optional jobInstructions = default; + Optional> labelCategories = default; + Optional labelingJobMediaProperties = default; + Optional mlAssistConfiguration = default; + Optional progressMetrics = default; + Optional projectId = default; + Optional provisioningState = default; + Optional> statusMessages = default; + Optional componentId = default; + Optional computeId = default; + Optional displayName = default; + Optional experimentName = default; + Optional identity = default; + Optional isArchived = default; + JobType jobType = default; + Optional notificationSetting = default; + Optional> secretsConfiguration = default; + Optional> services = default; + Optional status = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + createdDateTime = null; + continue; + } + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("dataConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataConfiguration = null; + continue; + } + dataConfiguration = LabelingDataConfiguration.DeserializeLabelingDataConfiguration(property.Value); + continue; + } + if (property.NameEquals("jobInstructions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jobInstructions = null; + continue; + } + jobInstructions = LabelingJobInstructions.DeserializeLabelingJobInstructions(property.Value); + continue; + } + if (property.NameEquals("labelCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + labelCategories = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, LabelCategory.DeserializeLabelCategory(property0.Value)); + } + labelCategories = dictionary; + continue; + } + if (property.NameEquals("labelingJobMediaProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + labelingJobMediaProperties = null; + continue; + } + labelingJobMediaProperties = LabelingJobMediaProperties.DeserializeLabelingJobMediaProperties(property.Value); + continue; + } + if (property.NameEquals("mlAssistConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mlAssistConfiguration = MachineLearningAssistConfiguration.DeserializeMachineLearningAssistConfiguration(property.Value); + continue; + } + if (property.NameEquals("progressMetrics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + progressMetrics = null; + continue; + } + progressMetrics = ProgressMetrics.DeserializeProgressMetrics(property.Value); + continue; + } + if (property.NameEquals("projectId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + projectId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new JobProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("statusMessages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + statusMessages = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JobStatusMessage.DeserializeJobStatusMessage(item)); + } + statusMessages = array; + continue; + } + if (property.NameEquals("componentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + componentId = null; + continue; + } + componentId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + computeId = null; + continue; + } + computeId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("experimentName"u8)) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + identity = null; + continue; + } + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value); + continue; + } + if (property.NameEquals("isArchived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("jobType"u8)) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("notificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notificationSetting = null; + continue; + } + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("secretsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secretsConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SecretConfiguration.DeserializeSecretConfiguration(property0.Value)); + } + secretsConfiguration = dictionary; + continue; + } + if (property.NameEquals("services"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + services = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value)); + } + services = dictionary; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new MachineLearningJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new LabelingJobProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, notificationSetting.Value, Optional.ToDictionary(secretsConfiguration), Optional.ToDictionary(services), Optional.ToNullable(status), Optional.ToNullable(createdDateTime), dataConfiguration.Value, jobInstructions.Value, Optional.ToDictionary(labelCategories), labelingJobMediaProperties.Value, mlAssistConfiguration.Value, progressMetrics.Value, Optional.ToNullable(projectId), Optional.ToNullable(provisioningState), Optional.ToList(statusMessages)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.cs new file mode 100644 index 0000000000000..45e40d3bc3ff6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobProperties.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Labeling job definition. + public partial class LabelingJobProperties : MachineLearningJobProperties + { + /// Initializes a new instance of LabelingJobProperties. + public LabelingJobProperties() + { + LabelCategories = new ChangeTrackingDictionary(); + StatusMessages = new ChangeTrackingList(); + JobType = JobType.Labeling; + } + + /// Initializes a new instance of LabelingJobProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// ARM resource ID of the component resource. + /// ARM resource ID of the compute resource. + /// Display name of job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Is the asset archived?. + /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// Status of the job. + /// Created time of the job in UTC timezone. + /// Configuration of data used in the job. + /// Labeling instructions of the job. + /// Label categories of the job. + /// + /// Media type specific properties in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// Configuration of MLAssist feature in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Progress metrics of the job. + /// Internal id of the job(Previously called project). + /// Specifies the labeling job provisioning state. + /// Status messages of the job. + internal LabelingJobProperties(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary secretsConfiguration, IDictionary services, MachineLearningJobStatus? status, DateTimeOffset? createdOn, LabelingDataConfiguration dataConfiguration, LabelingJobInstructions jobInstructions, IDictionary labelCategories, LabelingJobMediaProperties labelingJobMediaProperties, MachineLearningAssistConfiguration mlAssistConfiguration, ProgressMetrics progressMetrics, Guid? projectId, JobProvisioningState? provisioningState, IReadOnlyList statusMessages) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, secretsConfiguration, services, status) + { + CreatedOn = createdOn; + DataConfiguration = dataConfiguration; + JobInstructions = jobInstructions; + LabelCategories = labelCategories; + LabelingJobMediaProperties = labelingJobMediaProperties; + MlAssistConfiguration = mlAssistConfiguration; + ProgressMetrics = progressMetrics; + ProjectId = projectId; + ProvisioningState = provisioningState; + StatusMessages = statusMessages; + JobType = jobType; + } + + /// Created time of the job in UTC timezone. + public DateTimeOffset? CreatedOn { get; } + /// Configuration of data used in the job. + public LabelingDataConfiguration DataConfiguration { get; set; } + /// Labeling instructions of the job. + internal LabelingJobInstructions JobInstructions { get; set; } + /// The link to a page with detailed labeling instructions for labelers. + public Uri JobInstructionsUri + { + get => JobInstructions is null ? default : JobInstructions.Uri; + set + { + if (JobInstructions is null) + JobInstructions = new LabelingJobInstructions(); + JobInstructions.Uri = value; + } + } + + /// Label categories of the job. + public IDictionary LabelCategories { get; set; } + /// + /// Media type specific properties in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public LabelingJobMediaProperties LabelingJobMediaProperties { get; set; } + /// + /// Configuration of MLAssist feature in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public MachineLearningAssistConfiguration MlAssistConfiguration { get; set; } + /// Progress metrics of the job. + public ProgressMetrics ProgressMetrics { get; } + /// Internal id of the job(Previously called project). + public Guid? ProjectId { get; } + /// Specifies the labeling job provisioning state. + public JobProvisioningState? ProvisioningState { get; } + /// Status messages of the job. + public IReadOnlyList StatusMessages { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..4cc57bb6093ac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class LabelingJobResourceArmPaginatedResult + { + internal static LabelingJobResourceArmPaginatedResult DeserializeLabelingJobResourceArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningLabelingJobData.DeserializeMachineLearningLabelingJobData(item)); + } + value = array; + continue; + } + } + return new LabelingJobResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs new file mode 100644 index 0000000000000..394c2c6563548 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of LabelingJob entities. + internal partial class LabelingJobResourceArmPaginatedResult + { + /// Initializes a new instance of LabelingJobResourceArmPaginatedResult. + internal LabelingJobResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of LabelingJobResourceArmPaginatedResult. + /// The link to the next page of LabelingJob objects. If null, there are no additional pages. + /// An array of objects of type LabelingJob. + internal LabelingJobResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of LabelingJob objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type LabelingJob. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.Serialization.cs new file mode 100644 index 0000000000000..61e7d0fa1aaac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LabelingJobTextProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AnnotationType)) + { + writer.WritePropertyName("annotationType"u8); + writer.WriteStringValue(AnnotationType.Value.ToString()); + } + writer.WritePropertyName("mediaType"u8); + writer.WriteStringValue(MediaType.ToString()); + writer.WriteEndObject(); + } + + internal static LabelingJobTextProperties DeserializeLabelingJobTextProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional annotationType = default; + MediaType mediaType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("annotationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + annotationType = new TextAnnotationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("mediaType"u8)) + { + mediaType = new MediaType(property.Value.GetString()); + continue; + } + } + return new LabelingJobTextProperties(mediaType, Optional.ToNullable(annotationType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.cs new file mode 100644 index 0000000000000..c091c45859a59 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LabelingJobTextProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Properties of a labeling job for text data. + public partial class LabelingJobTextProperties : LabelingJobMediaProperties + { + /// Initializes a new instance of LabelingJobTextProperties. + public LabelingJobTextProperties() + { + MediaType = MediaType.Text; + } + + /// Initializes a new instance of LabelingJobTextProperties. + /// [Required] Media type of the job. + /// Annotation type of text labeling job. + internal LabelingJobTextProperties(MediaType mediaType, TextAnnotationType? annotationType) : base(mediaType) + { + AnnotationType = annotationType; + MediaType = mediaType; + } + + /// Annotation type of text labeling job. + public TextAnnotationType? AnnotationType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs new file mode 100644 index 0000000000000..4018381b49495 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class LakeHouseArtifact : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("artifactName"u8); + writer.WriteStringValue(ArtifactName); + writer.WritePropertyName("artifactType"u8); + writer.WriteStringValue(ArtifactType.ToString()); + writer.WriteEndObject(); + } + + internal static LakeHouseArtifact DeserializeLakeHouseArtifact(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string artifactName = default; + OneLakeArtifactType artifactType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("artifactName"u8)) + { + artifactName = property.Value.GetString(); + continue; + } + if (property.NameEquals("artifactType"u8)) + { + artifactType = new OneLakeArtifactType(property.Value.GetString()); + continue; + } + } + return new LakeHouseArtifact(artifactName, artifactType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs new file mode 100644 index 0000000000000..45f28f2a4bed7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The LakeHouseArtifact. + public partial class LakeHouseArtifact : OneLakeArtifact + { + /// Initializes a new instance of LakeHouseArtifact. + /// [Required] OneLake artifact name. + /// is null. + public LakeHouseArtifact(string artifactName) : base(artifactName) + { + Argument.AssertNotNull(artifactName, nameof(artifactName)); + + ArtifactType = OneLakeArtifactType.LakeHouse; + } + + /// Initializes a new instance of LakeHouseArtifact. + /// [Required] OneLake artifact name. + /// [Required] OneLake artifact type. + internal LakeHouseArtifact(string artifactName, OneLakeArtifactType artifactType) : base(artifactName, artifactType) + { + ArtifactType = artifactType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogTrainingMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogTrainingMetric.cs new file mode 100644 index 0000000000000..b74ff72db2313 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogTrainingMetric.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The LogTrainingMetric. + public readonly partial struct LogTrainingMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LogTrainingMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnableValue = "Enable"; + private const string DisableValue = "Disable"; + + /// Enable compute and log training metrics. + public static LogTrainingMetric Enable { get; } = new LogTrainingMetric(EnableValue); + /// Disable compute and log training metrics. + public static LogTrainingMetric Disable { get; } = new LogTrainingMetric(DisableValue); + /// Determines if two values are the same. + public static bool operator ==(LogTrainingMetric left, LogTrainingMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LogTrainingMetric left, LogTrainingMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LogTrainingMetric(string value) => new LogTrainingMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LogTrainingMetric other && Equals(other); + /// + public bool Equals(LogTrainingMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogValidationLoss.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogValidationLoss.cs new file mode 100644 index 0000000000000..b5e242260ac37 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogValidationLoss.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The LogValidationLoss. + public readonly partial struct LogValidationLoss : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LogValidationLoss(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnableValue = "Enable"; + private const string DisableValue = "Disable"; + + /// Enable compute and log validation metrics. + public static LogValidationLoss Enable { get; } = new LogValidationLoss(EnableValue); + /// Disable compute and log validation metrics. + public static LogValidationLoss Disable { get; } = new LogValidationLoss(DisableValue); + /// Determines if two values are the same. + public static bool operator ==(LogValidationLoss left, LogValidationLoss right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LogValidationLoss left, LogValidationLoss right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LogValidationLoss(string value) => new LogValidationLoss(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LogValidationLoss other && Equals(other); + /// + public bool Equals(LogValidationLoss other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.Serialization.cs new file mode 100644 index 0000000000000..434c0fb6369cc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MLAssistConfigurationDisabled : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mlAssist"u8); + writer.WriteStringValue(MlAssist.ToString()); + writer.WriteEndObject(); + } + + internal static MLAssistConfigurationDisabled DeserializeMLAssistConfigurationDisabled(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MLAssistConfigurationType mlAssist = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mlAssist"u8)) + { + mlAssist = new MLAssistConfigurationType(property.Value.GetString()); + continue; + } + } + return new MLAssistConfigurationDisabled(mlAssist); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.cs new file mode 100644 index 0000000000000..a575c709380c3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationDisabled.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Labeling MLAssist configuration definition when MLAssist is disabled. + public partial class MLAssistConfigurationDisabled : MachineLearningAssistConfiguration + { + /// Initializes a new instance of MLAssistConfigurationDisabled. + public MLAssistConfigurationDisabled() + { + MlAssist = MLAssistConfigurationType.Disabled; + } + + /// Initializes a new instance of MLAssistConfigurationDisabled. + /// [Required] Indicates whether MLAssist feature is enabled. + internal MLAssistConfigurationDisabled(MLAssistConfigurationType mlAssist) : base(mlAssist) + { + MlAssist = mlAssist; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationType.cs new file mode 100644 index 0000000000000..734838e18a82e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLAssistConfigurationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MLAssistConfigurationType. + internal readonly partial struct MLAssistConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MLAssistConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static MLAssistConfigurationType Enabled { get; } = new MLAssistConfigurationType(EnabledValue); + /// Disabled. + public static MLAssistConfigurationType Disabled { get; } = new MLAssistConfigurationType(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MLAssistConfigurationType left, MLAssistConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MLAssistConfigurationType left, MLAssistConfigurationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MLAssistConfigurationType(string value) => new MLAssistConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MLAssistConfigurationType other && Equals(other); + /// + public bool Equals(MLAssistConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.Serialization.cs new file mode 100644 index 0000000000000..fe79fe9c0bc89 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAllFeatures : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("filterType"u8); + writer.WriteStringValue(FilterType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningAllFeatures DeserializeMachineLearningAllFeatures(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringFeatureFilterType filterType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filterType"u8)) + { + filterType = new MonitoringFeatureFilterType(property.Value.GetString()); + continue; + } + } + return new MachineLearningAllFeatures(filterType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.cs new file mode 100644 index 0000000000000..44c80aa114625 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAllFeatures.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningAllFeatures. + public partial class MachineLearningAllFeatures : MonitoringFeatureFilterBase + { + /// Initializes a new instance of MachineLearningAllFeatures. + public MachineLearningAllFeatures() + { + FilterType = MonitoringFeatureFilterType.AllFeatures; + } + + /// Initializes a new instance of MachineLearningAllFeatures. + /// [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + internal MachineLearningAllFeatures(MonitoringFeatureFilterType filterType) : base(filterType) + { + FilterType = filterType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs index a4f35cd8e51cb..77cd689707fc4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs @@ -16,6 +16,18 @@ public partial class MachineLearningAssetBase : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -83,6 +95,7 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso { return null; } + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -90,6 +103,16 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso Optional> tags = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -149,7 +172,7 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso continue; } } - return new MachineLearningAssetBase(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived)); + return new MachineLearningAssetBase(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs index feab03fa0570b..dcaff9bcd9443 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs @@ -21,17 +21,21 @@ public MachineLearningAssetBase() /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. - internal MachineLearningAssetBase(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived) : base(description, properties, tags) + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + internal MachineLearningAssetBase(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived) : base(description, properties, tags) { + AutoDeleteSetting = autoDeleteSetting; IsAnonymous = isAnonymous; IsArchived = isArchived; } - /// If the name version are system generated (anonymous registration). + /// Specifies the lifecycle setting of managed data asset. + public AutoDeleteSetting AutoDeleteSetting { get; set; } + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. public bool? IsAnonymous { get; set; } - /// Is the asset archived?. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. public bool? IsArchived { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.Serialization.cs index 0056115ad5d72..c94df13b44c47 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.Serialization.cs @@ -31,8 +31,8 @@ internal static MachineLearningAssetReferenceBase DeserializeMachineLearningAsse switch (discriminator.GetString()) { case "DataPath": return MachineLearningDataPathAssetReference.DeserializeMachineLearningDataPathAssetReference(element); - case "Id": return MachineLearningIdAssetReference.DeserializeMachineLearningIdAssetReference(element); case "OutputPath": return MachineLearningOutputPathAssetReference.DeserializeMachineLearningOutputPathAssetReference(element); + case "Id": return MachineLearningIdAssetReference.DeserializeMachineLearningIdAssetReference(element); } } return UnknownAssetReferenceBase.DeserializeUnknownAssetReferenceBase(element); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.cs index 445245c06f430..92104241e521a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Base definition for asset references. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , and . /// public abstract partial class MachineLearningAssetReferenceBase { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.Serialization.cs new file mode 100644 index 0000000000000..b3f58d9e99cc6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAssistConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mlAssist"u8); + writer.WriteStringValue(MlAssist.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningAssistConfiguration DeserializeMachineLearningAssistConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("mlAssist", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Disabled": return MLAssistConfigurationDisabled.DeserializeMLAssistConfigurationDisabled(element); + case "Enabled": return MachineLearningAssistEnabledConfiguration.DeserializeMachineLearningAssistEnabledConfiguration(element); + } + } + return UnknownMLAssistConfiguration.DeserializeUnknownMLAssistConfiguration(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.cs new file mode 100644 index 0000000000000..8e61d97a6bca2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Labeling MLAssist configuration definition + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class MachineLearningAssistConfiguration + { + /// Initializes a new instance of MachineLearningAssistConfiguration. + protected MachineLearningAssistConfiguration() + { + } + + /// Initializes a new instance of MachineLearningAssistConfiguration. + /// [Required] Indicates whether MLAssist feature is enabled. + internal MachineLearningAssistConfiguration(MLAssistConfigurationType mlAssist) + { + MlAssist = mlAssist; + } + + /// [Required] Indicates whether MLAssist feature is enabled. + internal MLAssistConfigurationType MlAssist { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.Serialization.cs new file mode 100644 index 0000000000000..7562b206f27e5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAssistEnabledConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("inferencingComputeBinding"u8); + writer.WriteStringValue(InferencingComputeBinding); + writer.WritePropertyName("trainingComputeBinding"u8); + writer.WriteStringValue(TrainingComputeBinding); + writer.WritePropertyName("mlAssist"u8); + writer.WriteStringValue(MlAssist.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningAssistEnabledConfiguration DeserializeMachineLearningAssistEnabledConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string inferencingComputeBinding = default; + string trainingComputeBinding = default; + MLAssistConfigurationType mlAssist = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inferencingComputeBinding"u8)) + { + inferencingComputeBinding = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingComputeBinding"u8)) + { + trainingComputeBinding = property.Value.GetString(); + continue; + } + if (property.NameEquals("mlAssist"u8)) + { + mlAssist = new MLAssistConfigurationType(property.Value.GetString()); + continue; + } + } + return new MachineLearningAssistEnabledConfiguration(mlAssist, inferencingComputeBinding, trainingComputeBinding); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.cs new file mode 100644 index 0000000000000..563d8db61a961 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssistEnabledConfiguration.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Labeling MLAssist configuration definition when MLAssist is enabled. + public partial class MachineLearningAssistEnabledConfiguration : MachineLearningAssistConfiguration + { + /// Initializes a new instance of MachineLearningAssistEnabledConfiguration. + /// [Required] AML compute binding used in inferencing. + /// [Required] AML compute binding used in training. + /// or is null. + public MachineLearningAssistEnabledConfiguration(string inferencingComputeBinding, string trainingComputeBinding) + { + Argument.AssertNotNull(inferencingComputeBinding, nameof(inferencingComputeBinding)); + Argument.AssertNotNull(trainingComputeBinding, nameof(trainingComputeBinding)); + + InferencingComputeBinding = inferencingComputeBinding; + TrainingComputeBinding = trainingComputeBinding; + MlAssist = MLAssistConfigurationType.Enabled; + } + + /// Initializes a new instance of MachineLearningAssistEnabledConfiguration. + /// [Required] Indicates whether MLAssist feature is enabled. + /// [Required] AML compute binding used in inferencing. + /// [Required] AML compute binding used in training. + internal MachineLearningAssistEnabledConfiguration(MLAssistConfigurationType mlAssist, string inferencingComputeBinding, string trainingComputeBinding) : base(mlAssist) + { + InferencingComputeBinding = inferencingComputeBinding; + TrainingComputeBinding = trainingComputeBinding; + MlAssist = mlAssist; + } + + /// [Required] AML compute binding used in inferencing. + public string InferencingComputeBinding { get; set; } + /// [Required] AML compute binding used in training. + public string TrainingComputeBinding { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs index 80abcdc126f81..067402402ad94 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs @@ -69,10 +69,46 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } + if (Optional.IsDefined(ResourceGroup)) + { + if (ResourceGroup != null) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + else + { + writer.WriteNull("resourceGroup"); + } + } + if (Optional.IsDefined(SubscriptionId)) + { + if (SubscriptionId != null) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + else + { + writer.WriteNull("subscriptionId"); + } + } writer.WritePropertyName("credentials"u8); writer.WriteObjectValue(Credentials); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -135,8 +171,11 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur Optional endpoint = default; Optional protocol = default; Optional serviceDataAccessAuthIdentity = default; + Optional resourceGroup = default; + Optional subscriptionId = default; MachineLearningDatastoreCredentials credentials = default; DatastoreType datastoreType = default; + Optional intellectualProperty = default; Optional isDefault = default; Optional description = default; Optional> properties = default; @@ -192,6 +231,26 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } + if (property.NameEquals("resourceGroup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceGroup = null; + continue; + } + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subscriptionId = null; + continue; + } + subscriptionId = property.Value.GetString(); + continue; + } if (property.NameEquals("credentials"u8)) { credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); @@ -202,6 +261,16 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur datastoreType = new DatastoreType(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } if (property.NameEquals("isDefault"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -252,7 +321,7 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur continue; } } - return new MachineLearningAzureBlobDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName.Value, containerName.Value, endpoint.Value, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); + return new MachineLearningAzureBlobDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, intellectualProperty.Value, Optional.ToNullable(isDefault), accountName.Value, containerName.Value, endpoint.Value, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity), resourceGroup.Value, subscriptionId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs index 830fb7a62ded8..1564b3f494f98 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs @@ -18,7 +18,7 @@ public partial class MachineLearningAzureBlobDatastore : MachineLearningDatastor /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// is null. public MachineLearningAzureBlobDatastore(MachineLearningDatastoreCredentials credentials) : base(credentials) @@ -35,22 +35,27 @@ public MachineLearningAzureBlobDatastore(MachineLearningDatastoreCredentials cre /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Storage type backing the datastore. + /// Intellectual Property details. /// Readonly property to indicate if datastore is the workspace default datastore. /// Storage account name. /// Storage account container name. /// Azure cloud endpoint for the storage account. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. - internal MachineLearningAzureBlobDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string containerName, string endpoint, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + /// Azure Subscription Id. + internal MachineLearningAzureBlobDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, IntellectualProperty intellectualProperty, bool? isDefault, string accountName, string containerName, string endpoint, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string resourceGroup, string subscriptionId) : base(description, properties, tags, credentials, datastoreType, intellectualProperty, isDefault) { AccountName = accountName; ContainerName = containerName; Endpoint = endpoint; Protocol = protocol; ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + ResourceGroup = resourceGroup; + SubscriptionId = subscriptionId; DatastoreType = datastoreType; } @@ -64,5 +69,9 @@ internal MachineLearningAzureBlobDatastore(string description, IDictionary Indicates which identity to use to authenticate service data access to customer's storage. public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } + /// Azure Subscription Id. + public string SubscriptionId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs index fca663cda413c..62ef4efea0ec8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs @@ -23,10 +23,46 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("storeName"u8); writer.WriteStringValue(StoreName); + if (Optional.IsDefined(ResourceGroup)) + { + if (ResourceGroup != null) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + else + { + writer.WriteNull("resourceGroup"); + } + } + if (Optional.IsDefined(SubscriptionId)) + { + if (SubscriptionId != null) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + else + { + writer.WriteNull("subscriptionId"); + } + } writer.WritePropertyName("credentials"u8); writer.WriteObjectValue(Credentials); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -86,8 +122,11 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear } Optional serviceDataAccessAuthIdentity = default; string storeName = default; + Optional resourceGroup = default; + Optional subscriptionId = default; MachineLearningDatastoreCredentials credentials = default; DatastoreType datastoreType = default; + Optional intellectualProperty = default; Optional isDefault = default; Optional description = default; Optional> properties = default; @@ -108,6 +147,26 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear storeName = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGroup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceGroup = null; + continue; + } + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subscriptionId = null; + continue; + } + subscriptionId = property.Value.GetString(); + continue; + } if (property.NameEquals("credentials"u8)) { credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); @@ -118,6 +177,16 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear datastoreType = new DatastoreType(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } if (property.NameEquals("isDefault"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -168,7 +237,7 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear continue; } } - return new MachineLearningAzureDataLakeGen1Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), Optional.ToNullable(serviceDataAccessAuthIdentity), storeName); + return new MachineLearningAzureDataLakeGen1Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, intellectualProperty.Value, Optional.ToNullable(isDefault), Optional.ToNullable(serviceDataAccessAuthIdentity), storeName, resourceGroup.Value, subscriptionId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs index db33bcff91a9c..da03e616c4eae 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs @@ -18,7 +18,7 @@ public partial class MachineLearningAzureDataLakeGen1Datastore : MachineLearning /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Azure Data Lake store name. /// or is null. @@ -38,16 +38,21 @@ public MachineLearningAzureDataLakeGen1Datastore(MachineLearningDatastoreCredent /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Storage type backing the datastore. + /// Intellectual Property details. /// 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. /// [Required] Azure Data Lake store name. - internal MachineLearningAzureDataLakeGen1Datastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string storeName) : base(description, properties, tags, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + /// Azure Subscription Id. + internal MachineLearningAzureDataLakeGen1Datastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, IntellectualProperty intellectualProperty, bool? isDefault, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string storeName, string resourceGroup, string subscriptionId) : base(description, properties, tags, credentials, datastoreType, intellectualProperty, isDefault) { ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; StoreName = storeName; + ResourceGroup = resourceGroup; + SubscriptionId = subscriptionId; DatastoreType = datastoreType; } @@ -55,5 +60,9 @@ internal MachineLearningAzureDataLakeGen1Datastore(string description, IDictiona public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } /// [Required] Azure Data Lake store name. public string StoreName { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } + /// Azure Subscription Id. + public string SubscriptionId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs index 98f61b7177f5b..a1e977d76baa3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs @@ -49,10 +49,46 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } + if (Optional.IsDefined(ResourceGroup)) + { + if (ResourceGroup != null) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + else + { + writer.WriteNull("resourceGroup"); + } + } + if (Optional.IsDefined(SubscriptionId)) + { + if (SubscriptionId != null) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + else + { + writer.WriteNull("subscriptionId"); + } + } writer.WritePropertyName("credentials"u8); writer.WriteObjectValue(Credentials); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -115,8 +151,11 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear string filesystem = default; Optional protocol = default; Optional serviceDataAccessAuthIdentity = default; + Optional resourceGroup = default; + Optional subscriptionId = default; MachineLearningDatastoreCredentials credentials = default; DatastoreType datastoreType = default; + Optional intellectualProperty = default; Optional isDefault = default; Optional description = default; Optional> properties = default; @@ -162,6 +201,26 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } + if (property.NameEquals("resourceGroup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceGroup = null; + continue; + } + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subscriptionId = null; + continue; + } + subscriptionId = property.Value.GetString(); + continue; + } if (property.NameEquals("credentials"u8)) { credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); @@ -172,6 +231,16 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear datastoreType = new DatastoreType(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } if (property.NameEquals("isDefault"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -222,7 +291,7 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear continue; } } - return new MachineLearningAzureDataLakeGen2Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName, endpoint.Value, filesystem, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); + return new MachineLearningAzureDataLakeGen2Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, intellectualProperty.Value, Optional.ToNullable(isDefault), accountName, endpoint.Value, filesystem, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity), resourceGroup.Value, subscriptionId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs index 9c789f339940d..e631ff8eb3192 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs @@ -18,7 +18,7 @@ public partial class MachineLearningAzureDataLakeGen2Datastore : MachineLearning /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Storage account name. /// [Required] The name of the Data Lake Gen2 filesystem. @@ -41,22 +41,27 @@ public MachineLearningAzureDataLakeGen2Datastore(MachineLearningDatastoreCredent /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Storage type backing the datastore. + /// Intellectual Property details. /// Readonly property to indicate if datastore is the workspace default datastore. /// [Required] Storage account name. /// Azure cloud endpoint for the storage account. /// [Required] The name of the Data Lake Gen2 filesystem. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. - internal MachineLearningAzureDataLakeGen2Datastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string filesystem, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + /// Azure Subscription Id. + internal MachineLearningAzureDataLakeGen2Datastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, IntellectualProperty intellectualProperty, bool? isDefault, string accountName, string endpoint, string filesystem, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string resourceGroup, string subscriptionId) : base(description, properties, tags, credentials, datastoreType, intellectualProperty, isDefault) { AccountName = accountName; Endpoint = endpoint; Filesystem = filesystem; Protocol = protocol; ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + ResourceGroup = resourceGroup; + SubscriptionId = subscriptionId; DatastoreType = datastoreType; } @@ -70,5 +75,9 @@ internal MachineLearningAzureDataLakeGen2Datastore(string description, IDictiona public string Protocol { get; set; } /// Indicates which identity to use to authenticate service data access to customer's storage. public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } + /// Azure Subscription Id. + public string SubscriptionId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs index a1a822b32eca1..411903f8035c7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs @@ -49,10 +49,46 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } + if (Optional.IsDefined(ResourceGroup)) + { + if (ResourceGroup != null) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + else + { + writer.WriteNull("resourceGroup"); + } + } + if (Optional.IsDefined(SubscriptionId)) + { + if (SubscriptionId != null) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + else + { + writer.WriteNull("subscriptionId"); + } + } writer.WritePropertyName("credentials"u8); writer.WriteObjectValue(Credentials); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -115,8 +151,11 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur string fileShareName = default; Optional protocol = default; Optional serviceDataAccessAuthIdentity = default; + Optional resourceGroup = default; + Optional subscriptionId = default; MachineLearningDatastoreCredentials credentials = default; DatastoreType datastoreType = default; + Optional intellectualProperty = default; Optional isDefault = default; Optional description = default; Optional> properties = default; @@ -162,6 +201,26 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } + if (property.NameEquals("resourceGroup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceGroup = null; + continue; + } + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subscriptionId = null; + continue; + } + subscriptionId = property.Value.GetString(); + continue; + } if (property.NameEquals("credentials"u8)) { credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); @@ -172,6 +231,16 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur datastoreType = new DatastoreType(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } if (property.NameEquals("isDefault"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -222,7 +291,7 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur continue; } } - return new MachineLearningAzureFileDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName, endpoint.Value, fileShareName, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); + return new MachineLearningAzureFileDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, intellectualProperty.Value, Optional.ToNullable(isDefault), accountName, endpoint.Value, fileShareName, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity), resourceGroup.Value, subscriptionId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs index 521e4d9029e54..3b4abbcaae78d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs @@ -18,7 +18,7 @@ public partial class MachineLearningAzureFileDatastore : MachineLearningDatastor /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Storage account name. /// [Required] The name of the Azure file share that the datastore points to. @@ -41,22 +41,27 @@ public MachineLearningAzureFileDatastore(MachineLearningDatastoreCredentials cre /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Storage type backing the datastore. + /// Intellectual Property details. /// Readonly property to indicate if datastore is the workspace default datastore. /// [Required] Storage account name. /// Azure cloud endpoint for the storage account. /// [Required] The name of the Azure file share that the datastore points to. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. - internal MachineLearningAzureFileDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string fileShareName, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + /// Azure Subscription Id. + internal MachineLearningAzureFileDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, IntellectualProperty intellectualProperty, bool? isDefault, string accountName, string endpoint, string fileShareName, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string resourceGroup, string subscriptionId) : base(description, properties, tags, credentials, datastoreType, intellectualProperty, isDefault) { AccountName = accountName; Endpoint = endpoint; FileShareName = fileShareName; Protocol = protocol; ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + ResourceGroup = resourceGroup; + SubscriptionId = subscriptionId; DatastoreType = datastoreType; } @@ -70,5 +75,9 @@ internal MachineLearningAzureFileDatastore(string description, IDictionary Indicates which identity to use to authenticate service data access to customer's storage. public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } + /// Azure Subscription Id. + public string SubscriptionId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs index f3317275723aa..d54ac22d5dc13 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs @@ -28,6 +28,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("compute"); } } + if (Optional.IsDefined(DeploymentConfiguration)) + { + if (DeploymentConfiguration != null) + { + writer.WritePropertyName("deploymentConfiguration"u8); + writer.WriteObjectValue(DeploymentConfiguration); + } + else + { + writer.WriteNull("deploymentConfiguration"); + } + } if (Optional.IsDefined(ErrorThreshold)) { writer.WritePropertyName("errorThreshold"u8); @@ -176,6 +188,7 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn return null; } Optional compute = default; + Optional deploymentConfiguration = default; Optional errorThreshold = default; Optional loggingLevel = default; Optional maxConcurrencyPerInstance = default; @@ -203,6 +216,16 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn compute = property.Value.GetString(); continue; } + if (property.NameEquals("deploymentConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + deploymentConfiguration = null; + continue; + } + deploymentConfiguration = BatchDeploymentConfiguration.DeserializeBatchDeploymentConfiguration(property.Value); + continue; + } if (property.NameEquals("errorThreshold"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -353,7 +376,7 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn continue; } } - return new MachineLearningBatchDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), compute.Value, Optional.ToNullable(errorThreshold), Optional.ToNullable(loggingLevel), Optional.ToNullable(maxConcurrencyPerInstance), Optional.ToNullable(miniBatchSize), model.Value, Optional.ToNullable(outputAction), outputFileName.Value, Optional.ToNullable(provisioningState), resources.Value, retrySettings.Value); + return new MachineLearningBatchDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), compute.Value, deploymentConfiguration.Value, Optional.ToNullable(errorThreshold), Optional.ToNullable(loggingLevel), Optional.ToNullable(maxConcurrencyPerInstance), Optional.ToNullable(miniBatchSize), model.Value, Optional.ToNullable(outputAction), outputFileName.Value, Optional.ToNullable(provisioningState), resources.Value, retrySettings.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs index 4bbba9bb0ca17..e0b2b8366320f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs @@ -20,10 +20,15 @@ public MachineLearningBatchDeploymentProperties() /// Initializes a new instance of MachineLearningBatchDeploymentProperties. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. /// Compute target for batch inference operation. + /// + /// Properties relevant to different deployment types. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// /// /// Error threshold, if the error count for the entire input goes above this value, /// the batch inference will be aborted. Range is [-1, int.MaxValue]. @@ -41,7 +46,7 @@ public MachineLearningBatchDeploymentProperties() /// /// Reference to the model asset for the endpoint deployment. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , and . /// /// Indicates how the output will be organized. /// Customized output file name for append_row output action. @@ -54,9 +59,10 @@ public MachineLearningBatchDeploymentProperties() /// Retry Settings for the batch inference operation. /// If not provided, will default to the defaults defined in BatchRetrySettings. /// - internal MachineLearningBatchDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, string compute, int? errorThreshold, MachineLearningBatchLoggingLevel? loggingLevel, int? maxConcurrencyPerInstance, long? miniBatchSize, MachineLearningAssetReferenceBase model, MachineLearningBatchOutputAction? outputAction, string outputFileName, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningDeploymentResourceConfiguration resources, MachineLearningBatchRetrySettings retrySettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties) + internal MachineLearningBatchDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, string compute, BatchDeploymentConfiguration deploymentConfiguration, int? errorThreshold, MachineLearningBatchLoggingLevel? loggingLevel, int? maxConcurrencyPerInstance, long? miniBatchSize, MachineLearningAssetReferenceBase model, MachineLearningBatchOutputAction? outputAction, string outputFileName, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningDeploymentResourceConfiguration resources, MachineLearningBatchRetrySettings retrySettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties) { Compute = compute; + DeploymentConfiguration = deploymentConfiguration; ErrorThreshold = errorThreshold; LoggingLevel = loggingLevel; MaxConcurrencyPerInstance = maxConcurrencyPerInstance; @@ -72,6 +78,12 @@ internal MachineLearningBatchDeploymentProperties(MachineLearningCodeConfigurati /// Compute target for batch inference operation. public string Compute { get; set; } /// + /// Properties relevant to different deployment types. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public BatchDeploymentConfiguration DeploymentConfiguration { get; set; } + /// /// Error threshold, if the error count for the entire input goes above this value, /// the batch inference will be aborted. Range is [-1, int.MaxValue]. /// For FileDataset, this value is the count of file failures. @@ -92,7 +104,7 @@ internal MachineLearningBatchDeploymentProperties(MachineLearningCodeConfigurati /// /// Reference to the model asset for the endpoint deployment. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , and . /// public MachineLearningAssetReferenceBase Model { get; set; } /// Indicates how the output will be organized. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs index 7fe636cacccd2..8d5de22f6d4ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs @@ -9,7 +9,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Identity that will be used to access key vault for encryption at rest. + /// Identity object used for encryption. internal partial class MachineLearningCmkIdentity { /// Initializes a new instance of MachineLearningCmkIdentity. @@ -18,13 +18,13 @@ public MachineLearningCmkIdentity() } /// Initializes a new instance of MachineLearningCmkIdentity. - /// 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. internal MachineLearningCmkIdentity(ResourceIdentifier userAssignedIdentity) { UserAssignedIdentity = userAssignedIdentity; } - /// 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. public ResourceIdentifier UserAssignedIdentity { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs index db05bc4253b85..9351c299b5883 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs @@ -78,6 +78,7 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin { return null; } + Optional provisioningState = default; Optional isArchived = default; Optional latestVersion = default; Optional nextVersion = default; @@ -86,6 +87,15 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin Optional> tags = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -156,7 +166,7 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin continue; } } - return new MachineLearningCodeContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + return new MachineLearningCodeContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs index 10afbcfc9311f..6e723b94b7a6d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs @@ -24,8 +24,13 @@ public MachineLearningCodeContainerProperties() /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. - internal MachineLearningCodeContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + /// Provisioning state for the code container. + internal MachineLearningCodeContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, isArchived, latestVersion, nextVersion) { + ProvisioningState = provisioningState; } + + /// Provisioning state for the code container. + public RegistryAssetProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs index 5aaee6f3a93cd..2d450d12e9430 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs @@ -29,6 +29,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("codeUri"); } } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -97,6 +109,8 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC return null; } Optional codeUri = default; + Optional provisioningState = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -114,6 +128,25 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC codeUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -173,7 +206,7 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC continue; } } - return new MachineLearningCodeVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), codeUri.Value); + return new MachineLearningCodeVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), codeUri.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs index e741f46a018dc..9c0c24af25db4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs @@ -22,15 +22,20 @@ public MachineLearningCodeVersionProperties() /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// Uri where code is located. - internal MachineLearningCodeVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, Uri codeUri) : base(description, properties, tags, isAnonymous, isArchived) + /// Provisioning state for the code version. + internal MachineLearningCodeVersionProperties(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, Uri codeUri, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived) { CodeUri = codeUri; + ProvisioningState = provisioningState; } /// Uri where code is located. public Uri CodeUri { get; set; } + /// Provisioning state for the code version. + public RegistryAssetProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs index 002e0d7a47038..bcbaf08d2d3d6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs @@ -17,6 +17,18 @@ public partial class MachineLearningCommandJob : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AutologgerSettings)) + { + if (AutologgerSettings != null) + { + writer.WritePropertyName("autologgerSettings"u8); + writer.WriteObjectValue(AutologgerSettings); + } + else + { + writer.WriteNull("autologgerSettings"); + } + } if (Optional.IsDefined(CodeId)) { if (CodeId != null) @@ -111,6 +123,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("outputs"); } } + if (Optional.IsDefined(QueueSettings)) + { + if (QueueSettings != null) + { + writer.WritePropertyName("queueSettings"u8); + writer.WriteObjectValue(QueueSettings); + } + else + { + writer.WriteNull("queueSettings"); + } + } if (Optional.IsDefined(Resources)) { writer.WritePropertyName("resources"u8); @@ -176,6 +200,36 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("jobType"u8); writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + if (Optional.IsCollectionDefined(SecretsConfiguration)) + { + if (SecretsConfiguration != null) + { + writer.WritePropertyName("secretsConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SecretsConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secretsConfiguration"); + } + } if (Optional.IsCollectionDefined(Services)) { if (Services != null) @@ -251,6 +305,7 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J { return null; } + Optional autologgerSettings = default; Optional codeId = default; string command = default; Optional distribution = default; @@ -260,6 +315,7 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J Optional limits = default; Optional> outputs = default; Optional parameters = default; + Optional queueSettings = default; Optional resources = default; Optional componentId = default; Optional computeId = default; @@ -268,6 +324,8 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J Optional identity = default; Optional isArchived = default; JobType jobType = default; + Optional notificationSetting = default; + Optional> secretsConfiguration = default; Optional> services = default; Optional status = default; Optional description = default; @@ -275,6 +333,16 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J Optional> tags = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("autologgerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autologgerSettings = null; + continue; + } + autologgerSettings = AutologgerSettings.DeserializeAutologgerSettings(property.Value); + continue; + } if (property.NameEquals("codeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -370,6 +438,16 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J parameters = BinaryData.FromString(property.Value.GetRawText()); continue; } + if (property.NameEquals("queueSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + queueSettings = null; + continue; + } + queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value); + continue; + } if (property.NameEquals("resources"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -438,6 +516,31 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J jobType = new JobType(property.Value.GetString()); continue; } + if (property.NameEquals("notificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notificationSetting = null; + continue; + } + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("secretsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secretsConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SecretConfiguration.DeserializeSecretConfiguration(property0.Value)); + } + secretsConfiguration = dictionary; + continue; + } if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -503,7 +606,7 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J continue; } } - return new MachineLearningCommandJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), codeId.Value, command, distribution.Value, environmentId, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(inputs), limits.Value, Optional.ToDictionary(outputs), parameters.Value, resources.Value); + return new MachineLearningCommandJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, notificationSetting.Value, Optional.ToDictionary(secretsConfiguration), Optional.ToDictionary(services), Optional.ToNullable(status), autologgerSettings.Value, codeId.Value, command, distribution.Value, environmentId, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(inputs), limits.Value, Optional.ToDictionary(outputs), parameters.Value, queueSettings.Value, resources.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs index 511f4651d1937..0c852d7a2b95c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs @@ -47,17 +47,20 @@ public MachineLearningCommandJob(string command, ResourceIdentifier environmentI /// /// Is the asset archived?. /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. /// /// Status of the job. + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. /// ARM resource ID of the code asset. /// [Required] The command to execute on startup of the job. eg. "python train.py". /// - /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// /// [Required] The ARM resource ID of the Environment specification for the job. /// Environment variables included in the job. @@ -73,9 +76,11 @@ public MachineLearningCommandJob(string command, ResourceIdentifier environmentI /// The available derived classes include , , , , and . /// /// Input parameters. + /// Queue settings for the job. /// Compute Resource configuration for the job. - internal MachineLearningCommandJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, ResourceIdentifier codeId, string command, MachineLearningDistributionConfiguration distribution, ResourceIdentifier environmentId, IDictionary environmentVariables, IDictionary inputs, MachineLearningCommandJobLimits limits, IDictionary outputs, BinaryData parameters, MachineLearningJobResourceConfiguration resources) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + internal MachineLearningCommandJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary secretsConfiguration, IDictionary services, MachineLearningJobStatus? status, AutologgerSettings autologgerSettings, ResourceIdentifier codeId, string command, MachineLearningDistributionConfiguration distribution, ResourceIdentifier environmentId, IDictionary environmentVariables, IDictionary inputs, MachineLearningCommandJobLimits limits, IDictionary outputs, BinaryData parameters, JobQueueSettings queueSettings, MachineLearningJobResourceConfiguration resources) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, secretsConfiguration, services, status) { + AutologgerSettings = autologgerSettings; CodeId = codeId; Command = command; Distribution = distribution; @@ -85,18 +90,31 @@ internal MachineLearningCommandJob(string description, IDictionary Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + internal AutologgerSettings AutologgerSettings { get; set; } + /// [Required] Indicates whether mlflow autologger is enabled. + public MachineLearningFlowAutoLoggerState? MlflowAutologger + { + get => AutologgerSettings is null ? default(MachineLearningFlowAutoLoggerState?) : AutologgerSettings.MlflowAutologger; + set + { + AutologgerSettings = value.HasValue ? new AutologgerSettings(value.Value) : null; + } + } + /// ARM resource ID of the code asset. public ResourceIdentifier CodeId { get; set; } /// [Required] The command to execute on startup of the job. eg. "python train.py". public string Command { get; set; } /// - /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// public MachineLearningDistributionConfiguration Distribution { get; set; } /// [Required] The ARM resource ID of the Environment specification for the job. @@ -148,6 +166,8 @@ internal MachineLearningCommandJob(string description, IDictionary /// public BinaryData Parameters { get; } + /// Queue settings for the job. + public JobQueueSettings QueueSettings { get; set; } /// Compute Resource configuration for the job. public MachineLearningJobResourceConfiguration Resources { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs index 40823706bc1a6..3f1e9221c4c60 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs @@ -78,6 +78,7 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe { return null; } + Optional provisioningState = default; Optional isArchived = default; Optional latestVersion = default; Optional nextVersion = default; @@ -86,6 +87,15 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe Optional> tags = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -156,7 +166,7 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe continue; } } - return new MachineLearningComponentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + return new MachineLearningComponentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs index ed5162f96baea..1cfc81f1fc231 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs @@ -27,8 +27,13 @@ public MachineLearningComponentContainerProperties() /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. - internal MachineLearningComponentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + /// Provisioning state for the component container. + internal MachineLearningComponentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, isArchived, latestVersion, nextVersion) { + ProvisioningState = provisioningState; } + + /// Provisioning state for the component container. + public RegistryAssetProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs index 6112ed10543ec..1818ae09118e7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs @@ -33,6 +33,30 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("componentSpec"); } } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -101,6 +125,9 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear return null; } Optional componentSpec = default; + Optional provisioningState = default; + Optional stage = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -118,6 +145,35 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear componentSpec = BinaryData.FromString(property.Value.GetRawText()); continue; } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -177,7 +233,7 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear continue; } } - return new MachineLearningComponentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), componentSpec.Value); + return new MachineLearningComponentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), componentSpec.Value, Optional.ToNullable(provisioningState), stage.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs index a5e28beb91d8d..8a9c1110f8d44 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs @@ -22,15 +22,20 @@ public MachineLearningComponentVersionProperties() /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// /// Defines Component definition details. /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> /// - internal MachineLearningComponentVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, BinaryData componentSpec) : base(description, properties, tags, isAnonymous, isArchived) + /// Provisioning state for the component version. + /// Stage in the component lifecycle. + internal MachineLearningComponentVersionProperties(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, BinaryData componentSpec, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived) { ComponentSpec = componentSpec; + ProvisioningState = provisioningState; + Stage = stage; } /// @@ -65,5 +70,9 @@ internal MachineLearningComponentVersionProperties(string description, IDictiona /// /// public BinaryData ComponentSpec { get; set; } + /// Provisioning state for the component version. + public RegistryAssetProvisioningState? ProvisioningState { get; } + /// Stage in the component lifecycle. + public string Stage { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs index 69c914d767edc..06c902750e54e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs @@ -38,6 +38,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("applicationSharingPolicy"u8); writer.WriteStringValue(ApplicationSharingPolicy.Value.ToString()); } + if (Optional.IsDefined(AutologgerSettings)) + { + if (AutologgerSettings != null) + { + writer.WritePropertyName("autologgerSettings"u8); + writer.WriteObjectValue(AutologgerSettings); + } + else + { + writer.WriteNull("autologgerSettings"); + } + } if (Optional.IsDefined(SshSettings)) { if (SshSettings != null) @@ -50,6 +62,23 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("sshSettings"); } } + if (Optional.IsCollectionDefined(CustomServices)) + { + if (CustomServices != null) + { + writer.WritePropertyName("customServices"u8); + writer.WriteStartArray(); + foreach (var item in CustomServices) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("customServices"); + } + } if (Optional.IsDefined(ComputeInstanceAuthorizationType)) { if (ComputeInstanceAuthorizationType != null) @@ -86,10 +115,34 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("setupScripts"); } } + if (Optional.IsDefined(Schedules)) + { + if (Schedules != null) + { + writer.WritePropertyName("schedules"u8); + writer.WriteObjectValue(Schedules); + } + else + { + writer.WriteNull("schedules"); + } + } + if (Optional.IsDefined(IdleTimeBeforeShutdown)) + { + writer.WritePropertyName("idleTimeBeforeShutdown"u8); + writer.WriteStringValue(IdleTimeBeforeShutdown); + } if (Optional.IsDefined(EnableNodePublicIP)) { - writer.WritePropertyName("enableNodePublicIp"u8); - writer.WriteBooleanValue(EnableNodePublicIP.Value); + if (EnableNodePublicIP != null) + { + writer.WritePropertyName("enableNodePublicIp"u8); + writer.WriteBooleanValue(EnableNodePublicIP.Value); + } + else + { + writer.WriteNull("enableNodePublicIp"); + } } writer.WriteEndObject(); } @@ -103,7 +156,10 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn Optional vmSize = default; Optional subnet = default; Optional applicationSharingPolicy = default; + Optional autologgerSettings = default; Optional sshSettings = default; + Optional> customServices = default; + Optional osImageMetadata = default; Optional connectivityEndpoints = default; Optional> applications = default; Optional createdBy = default; @@ -114,7 +170,8 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn Optional setupScripts = default; Optional lastOperation = default; Optional schedules = default; - Optional enableNodePublicIP = default; + Optional idleTimeBeforeShutdown = default; + Optional enableNodePublicIP = default; Optional> containers = default; Optional> dataDisks = default; Optional> dataMounts = default; @@ -145,6 +202,16 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn applicationSharingPolicy = new MachineLearningApplicationSharingPolicy(property.Value.GetString()); continue; } + if (property.NameEquals("autologgerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autologgerSettings = null; + continue; + } + autologgerSettings = ComputeInstanceAutologgerSettings.DeserializeComputeInstanceAutologgerSettings(property.Value); + continue; + } if (property.NameEquals("sshSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -155,6 +222,30 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn sshSettings = MachineLearningComputeInstanceSshSettings.DeserializeMachineLearningComputeInstanceSshSettings(property.Value); continue; } + if (property.NameEquals("customServices"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + customServices = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomService.DeserializeCustomService(item)); + } + customServices = array; + continue; + } + if (property.NameEquals("osImageMetadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osImageMetadata = ImageMetadata.DeserializeImageMetadata(property.Value); + continue; + } if (property.NameEquals("connectivityEndpoints"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -260,10 +351,16 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn schedules = ComputeSchedules.DeserializeComputeSchedules(property.Value); continue; } + if (property.NameEquals("idleTimeBeforeShutdown"u8)) + { + idleTimeBeforeShutdown = property.Value.GetString(); + continue; + } if (property.NameEquals("enableNodePublicIp"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + enableNodePublicIP = null; continue; } enableNodePublicIP = property.Value.GetBoolean(); @@ -324,7 +421,7 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn continue; } } - return new MachineLearningComputeInstanceProperties(vmSize.Value, subnet.Value, Optional.ToNullable(applicationSharingPolicy), sshSettings.Value, connectivityEndpoints.Value, Optional.ToList(applications), createdBy.Value, Optional.ToList(errors), Optional.ToNullable(state), Optional.ToNullable(computeInstanceAuthorizationType), personalComputeInstanceSettings.Value, setupScripts.Value, lastOperation.Value, schedules.Value, Optional.ToNullable(enableNodePublicIP), Optional.ToList(containers), Optional.ToList(dataDisks), Optional.ToList(dataMounts), versions.Value); + return new MachineLearningComputeInstanceProperties(vmSize.Value, subnet.Value, Optional.ToNullable(applicationSharingPolicy), autologgerSettings.Value, sshSettings.Value, Optional.ToList(customServices), osImageMetadata.Value, connectivityEndpoints.Value, Optional.ToList(applications), createdBy.Value, Optional.ToList(errors), Optional.ToNullable(state), Optional.ToNullable(computeInstanceAuthorizationType), personalComputeInstanceSettings.Value, setupScripts.Value, lastOperation.Value, schedules.Value, idleTimeBeforeShutdown.Value, Optional.ToNullable(enableNodePublicIP), Optional.ToList(containers), Optional.ToList(dataDisks), Optional.ToList(dataMounts), versions.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs index 82b39f22822cb..3c242c19c8195 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs @@ -16,6 +16,7 @@ public partial class MachineLearningComputeInstanceProperties /// Initializes a new instance of MachineLearningComputeInstanceProperties. public MachineLearningComputeInstanceProperties() { + CustomServices = new ChangeTrackingList(); Applications = new ChangeTrackingList(); Errors = new ChangeTrackingList(); Containers = new ChangeTrackingList(); @@ -27,7 +28,10 @@ public MachineLearningComputeInstanceProperties() /// Virtual Machine Size. /// Virtual network subnet resource ID the compute nodes belong to. /// Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. + /// Specifies settings for autologger. /// Specifies policy and settings for SSH access. + /// List of Custom Services added to the compute. + /// Returns metadata about the operating system image for this compute instance. /// Describes all connectivity endpoints available for this ComputeInstance. /// Describes available applications and their endpoints on this ComputeInstance. /// Describes information on user who created this ComputeInstance. @@ -38,17 +42,21 @@ public MachineLearningComputeInstanceProperties() /// Details of customized scripts to execute for setting up the cluster. /// The last operation on ComputeInstance. /// The list of schedules to be applied on the computes. + /// Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. /// Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. /// Describes informations of containers on this ComputeInstance. /// Describes informations of dataDisks on this ComputeInstance. /// Describes informations of dataMounts on this ComputeInstance. /// ComputeInstance version. - internal MachineLearningComputeInstanceProperties(string vmSize, ResourceId subnet, MachineLearningApplicationSharingPolicy? applicationSharingPolicy, MachineLearningComputeInstanceSshSettings sshSettings, MachineLearningComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, MachineLearningComputeInstanceCreatedBy createdBy, IReadOnlyList errors, MachineLearningComputeInstanceState? state, MachineLearningComputeInstanceAuthorizationType? computeInstanceAuthorizationType, PersonalComputeInstanceSettings personalComputeInstanceSettings, SetupScripts setupScriptsSettings, MachineLearningComputeInstanceLastOperation lastOperation, ComputeSchedules schedules, bool? enableNodePublicIP, IReadOnlyList containers, IReadOnlyList dataDisks, IReadOnlyList dataMounts, ComputeInstanceVersion versions) + internal MachineLearningComputeInstanceProperties(string vmSize, ResourceId subnet, MachineLearningApplicationSharingPolicy? applicationSharingPolicy, ComputeInstanceAutologgerSettings autologgerSettings, MachineLearningComputeInstanceSshSettings sshSettings, IList customServices, ImageMetadata osImageMetadata, MachineLearningComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, MachineLearningComputeInstanceCreatedBy createdBy, IReadOnlyList errors, MachineLearningComputeInstanceState? state, MachineLearningComputeInstanceAuthorizationType? computeInstanceAuthorizationType, PersonalComputeInstanceSettings personalComputeInstanceSettings, SetupScripts setupScriptsSettings, MachineLearningComputeInstanceLastOperation lastOperation, ComputeSchedules schedules, string idleTimeBeforeShutdown, bool? enableNodePublicIP, IReadOnlyList containers, IReadOnlyList dataDisks, IReadOnlyList dataMounts, ComputeInstanceVersion versions) { VmSize = vmSize; Subnet = subnet; ApplicationSharingPolicy = applicationSharingPolicy; + AutologgerSettings = autologgerSettings; SshSettings = sshSettings; + CustomServices = customServices; + OSImageMetadata = osImageMetadata; ConnectivityEndpoints = connectivityEndpoints; Applications = applications; CreatedBy = createdBy; @@ -59,6 +67,7 @@ internal MachineLearningComputeInstanceProperties(string vmSize, ResourceId subn SetupScriptsSettings = setupScriptsSettings; LastOperation = lastOperation; Schedules = schedules; + IdleTimeBeforeShutdown = idleTimeBeforeShutdown; EnableNodePublicIP = enableNodePublicIP; Containers = containers; DataDisks = dataDisks; @@ -79,8 +88,26 @@ public ResourceIdentifier SubnetId /// Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. public MachineLearningApplicationSharingPolicy? ApplicationSharingPolicy { get; set; } + /// Specifies settings for autologger. + internal ComputeInstanceAutologgerSettings AutologgerSettings { get; set; } + /// Indicates whether mlflow autologger is enabled for notebooks. + public MachineLearningFlowAutoLogger? MlflowAutologger + { + get => AutologgerSettings is null ? default : AutologgerSettings.MlflowAutologger; + set + { + if (AutologgerSettings is null) + AutologgerSettings = new ComputeInstanceAutologgerSettings(); + AutologgerSettings.MlflowAutologger = value; + } + } + /// Specifies policy and settings for SSH access. public MachineLearningComputeInstanceSshSettings SshSettings { get; set; } + /// List of Custom Services added to the compute. + public IList CustomServices { get; set; } + /// Returns metadata about the operating system image for this compute instance. + public ImageMetadata OSImageMetadata { get; } /// Describes all connectivity endpoints available for this ComputeInstance. public MachineLearningComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get; } /// Describes available applications and their endpoints on this ComputeInstance. @@ -124,13 +151,20 @@ public MachineLearningScriptsToExecute Scripts /// The last operation on ComputeInstance. public MachineLearningComputeInstanceLastOperation LastOperation { get; } /// The list of schedules to be applied on the computes. - internal ComputeSchedules Schedules { get; } + internal ComputeSchedules Schedules { get; set; } /// The list of compute start stop schedules to be applied. public IReadOnlyList SchedulesComputeStartStop { - get => Schedules?.ComputeStartStop; + get + { + if (Schedules is null) + Schedules = new ComputeSchedules(); + return Schedules.ComputeStartStop; + } } + /// Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + public string IdleTimeBeforeShutdown { get; set; } /// Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. public bool? EnableNodePublicIP { get; set; } /// Describes informations of containers on this ComputeInstance. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs index d64c980c2646e..9cad099e8feb6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The compute power action. + /// [Required] The compute power action. public readonly partial struct MachineLearningComputePowerAction : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.Serialization.cs index ee56468c0c012..5aa965c91354e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.Serialization.cs @@ -10,8 +10,44 @@ namespace Azure.ResourceManager.MachineLearning.Models { - public partial class MachineLearningComputeStartStopSchedule + public partial class MachineLearningComputeStartStopSchedule : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.Value.ToString()); + } + if (Optional.IsDefined(TriggerType)) + { + writer.WritePropertyName("triggerType"u8); + writer.WriteStringValue(TriggerType.Value.ToString()); + } + if (Optional.IsDefined(RecurrenceSchedule)) + { + writer.WritePropertyName("recurrence"u8); + writer.WriteObjectValue(RecurrenceSchedule); + } + if (Optional.IsDefined(CronSchedule)) + { + writer.WritePropertyName("cron"u8); + writer.WriteObjectValue(CronSchedule); + } + if (Optional.IsDefined(Schedule)) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule); + } + writer.WriteEndObject(); + } + internal static MachineLearningComputeStartStopSchedule DeserializeMachineLearningComputeStartStopSchedule(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) @@ -23,8 +59,8 @@ internal static MachineLearningComputeStartStopSchedule DeserializeMachineLearni Optional status = default; Optional action = default; Optional triggerType = default; - Optional recurrence = default; - Optional cron = default; + Optional recurrence = default; + Optional cron = default; Optional schedule = default; foreach (var property in element.EnumerateObject()) { @@ -80,7 +116,7 @@ internal static MachineLearningComputeStartStopSchedule DeserializeMachineLearni { continue; } - recurrence = MachineLearningRecurrenceTrigger.DeserializeMachineLearningRecurrenceTrigger(property.Value); + recurrence = ComputeStartStopRecurrenceSchedule.DeserializeComputeStartStopRecurrenceSchedule(property.Value); continue; } if (property.NameEquals("cron"u8)) @@ -89,7 +125,7 @@ internal static MachineLearningComputeStartStopSchedule DeserializeMachineLearni { continue; } - cron = CronTrigger.DeserializeCronTrigger(property.Value); + cron = ComputeStartStopCronSchedule.DeserializeComputeStartStopCronSchedule(property.Value); continue; } if (property.NameEquals("schedule"u8)) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs index 565f9dcf50fa1..f19efb116ff1f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningComputeStartStopSchedule { /// Initializes a new instance of MachineLearningComputeStartStopSchedule. - internal MachineLearningComputeStartStopSchedule() + public MachineLearningComputeStartStopSchedule() { } @@ -21,18 +21,18 @@ internal MachineLearningComputeStartStopSchedule() /// Is the schedule enabled or disabled?. /// [Required] The compute power action. /// [Required] The schedule trigger type. - /// Required if triggerType is Recurrence. - /// Required if triggerType is Cron. + /// Required if triggerType is Recurrence. + /// Required if triggerType is Cron. /// [Deprecated] Not used any more. - internal MachineLearningComputeStartStopSchedule(string id, MachineLearningComputeProvisioningStatus? provisioningStatus, MachineLearningScheduleStatus? status, MachineLearningComputePowerAction? action, MachineLearningTriggerType? triggerType, MachineLearningRecurrenceTrigger recurrence, CronTrigger cron, MachineLearningScheduleBase schedule) + internal MachineLearningComputeStartStopSchedule(string id, MachineLearningComputeProvisioningStatus? provisioningStatus, MachineLearningScheduleStatus? status, MachineLearningComputePowerAction? action, MachineLearningTriggerType? triggerType, ComputeStartStopRecurrenceSchedule recurrenceSchedule, ComputeStartStopCronSchedule cronSchedule, MachineLearningScheduleBase schedule) { Id = id; ProvisioningStatus = provisioningStatus; Status = status; Action = action; TriggerType = triggerType; - Recurrence = recurrence; - Cron = cron; + RecurrenceSchedule = recurrenceSchedule; + CronSchedule = cronSchedule; Schedule = schedule; } @@ -41,16 +41,16 @@ internal MachineLearningComputeStartStopSchedule(string id, MachineLearningCompu /// The current deployment state of schedule. public MachineLearningComputeProvisioningStatus? ProvisioningStatus { get; } /// Is the schedule enabled or disabled?. - public MachineLearningScheduleStatus? Status { get; } + public MachineLearningScheduleStatus? Status { get; set; } /// [Required] The compute power action. - public MachineLearningComputePowerAction? Action { get; } + public MachineLearningComputePowerAction? Action { get; set; } /// [Required] The schedule trigger type. - public MachineLearningTriggerType? TriggerType { get; } + public MachineLearningTriggerType? TriggerType { get; set; } /// Required if triggerType is Recurrence. - public MachineLearningRecurrenceTrigger Recurrence { get; } + public ComputeStartStopRecurrenceSchedule RecurrenceSchedule { get; set; } /// Required if triggerType is Cron. - public CronTrigger Cron { get; } + public ComputeStartStopCronSchedule CronSchedule { get; set; } /// [Deprecated] Not used any more. - public MachineLearningScheduleBase Schedule { get; } + public MachineLearningScheduleBase Schedule { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionAuthType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionAuthType.cs index 7872c059157a4..f4064f14a5989 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionAuthType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionAuthType.cs @@ -27,6 +27,10 @@ public MachineLearningConnectionAuthType(string value) private const string UsernamePasswordValue = "UsernamePassword"; private const string NoneValue = "None"; private const string SasValue = "SAS"; + private const string ServicePrincipalValue = "ServicePrincipal"; + private const string AccessKeyValue = "AccessKey"; + private const string ApiKeyValue = "ApiKey"; + private const string CustomKeysValue = "CustomKeys"; /// PAT. public static MachineLearningConnectionAuthType Pat { get; } = new MachineLearningConnectionAuthType(PatValue); @@ -38,6 +42,14 @@ public MachineLearningConnectionAuthType(string value) public static MachineLearningConnectionAuthType None { get; } = new MachineLearningConnectionAuthType(NoneValue); /// SAS. public static MachineLearningConnectionAuthType Sas { get; } = new MachineLearningConnectionAuthType(SasValue); + /// ServicePrincipal. + public static MachineLearningConnectionAuthType ServicePrincipal { get; } = new MachineLearningConnectionAuthType(ServicePrincipalValue); + /// AccessKey. + public static MachineLearningConnectionAuthType AccessKey { get; } = new MachineLearningConnectionAuthType(AccessKeyValue); + /// ApiKey. + public static MachineLearningConnectionAuthType ApiKey { get; } = new MachineLearningConnectionAuthType(ApiKeyValue); + /// CustomKeys. + public static MachineLearningConnectionAuthType CustomKeys { get; } = new MachineLearningConnectionAuthType(CustomKeysValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningConnectionAuthType left, MachineLearningConnectionAuthType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs index 9827e23a6791e..95bf0a9810db0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs @@ -25,6 +25,19 @@ public MachineLearningConnectionCategory(string value) private const string PythonFeedValue = "PythonFeed"; private const string ContainerRegistryValue = "ContainerRegistry"; private const string GitValue = "Git"; + private const string S3Value = "S3"; + private const string SnowflakeValue = "Snowflake"; + private const string AzureSqlDBValue = "AzureSqlDb"; + private const string AzureSynapseAnalyticsValue = "AzureSynapseAnalytics"; + private const string AzureMySqlDBValue = "AzureMySqlDb"; + private const string AzurePostgresDBValue = "AzurePostgresDb"; + private const string AdlsGen2Value = "ADLSGen2"; + private const string RedisValue = "Redis"; + private const string ApiKeyValue = "ApiKey"; + private const string AzureOpenAIValue = "AzureOpenAI"; + private const string CognitiveSearchValue = "CognitiveSearch"; + private const string CognitiveServiceValue = "CognitiveService"; + private const string CustomKeysValue = "CustomKeys"; /// PythonFeed. public static MachineLearningConnectionCategory PythonFeed { get; } = new MachineLearningConnectionCategory(PythonFeedValue); @@ -32,6 +45,32 @@ public MachineLearningConnectionCategory(string value) public static MachineLearningConnectionCategory ContainerRegistry { get; } = new MachineLearningConnectionCategory(ContainerRegistryValue); /// Git. public static MachineLearningConnectionCategory Git { get; } = new MachineLearningConnectionCategory(GitValue); + /// S3. + public static MachineLearningConnectionCategory S3 { get; } = new MachineLearningConnectionCategory(S3Value); + /// Snowflake. + public static MachineLearningConnectionCategory Snowflake { get; } = new MachineLearningConnectionCategory(SnowflakeValue); + /// AzureSqlDb. + public static MachineLearningConnectionCategory AzureSqlDB { get; } = new MachineLearningConnectionCategory(AzureSqlDBValue); + /// AzureSynapseAnalytics. + public static MachineLearningConnectionCategory AzureSynapseAnalytics { get; } = new MachineLearningConnectionCategory(AzureSynapseAnalyticsValue); + /// AzureMySqlDb. + public static MachineLearningConnectionCategory AzureMySqlDB { get; } = new MachineLearningConnectionCategory(AzureMySqlDBValue); + /// AzurePostgresDb. + public static MachineLearningConnectionCategory AzurePostgresDB { get; } = new MachineLearningConnectionCategory(AzurePostgresDBValue); + /// ADLSGen2. + public static MachineLearningConnectionCategory AdlsGen2 { get; } = new MachineLearningConnectionCategory(AdlsGen2Value); + /// Redis. + public static MachineLearningConnectionCategory Redis { get; } = new MachineLearningConnectionCategory(RedisValue); + /// ApiKey. + public static MachineLearningConnectionCategory ApiKey { get; } = new MachineLearningConnectionCategory(ApiKeyValue); + /// AzureOpenAI. + public static MachineLearningConnectionCategory AzureOpenAI { get; } = new MachineLearningConnectionCategory(AzureOpenAIValue); + /// CognitiveSearch. + public static MachineLearningConnectionCategory CognitiveSearch { get; } = new MachineLearningConnectionCategory(CognitiveSearchValue); + /// CognitiveService. + public static MachineLearningConnectionCategory CognitiveService { get; } = new MachineLearningConnectionCategory(CognitiveServiceValue); + /// CustomKeys. + public static MachineLearningConnectionCategory CustomKeys { get; } = new MachineLearningConnectionCategory(CustomKeysValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningConnectionCategory left, MachineLearningConnectionCategory right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs index 65c30bfd86d0c..8cf93d4a2de82 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs @@ -20,8 +20,8 @@ internal static MachineLearningContainerRegistryCredentials DeserializeMachineLe return null; } Optional location = default; - Optional username = default; Optional> passwords = default; + Optional username = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location"u8)) @@ -33,11 +33,6 @@ internal static MachineLearningContainerRegistryCredentials DeserializeMachineLe location = new AzureLocation(property.Value.GetString()); continue; } - if (property.NameEquals("username"u8)) - { - username = property.Value.GetString(); - continue; - } if (property.NameEquals("passwords"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -52,8 +47,13 @@ internal static MachineLearningContainerRegistryCredentials DeserializeMachineLe passwords = array; continue; } + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } } - return new MachineLearningContainerRegistryCredentials(Optional.ToNullable(location), username.Value, Optional.ToList(passwords)); + return new MachineLearningContainerRegistryCredentials(Optional.ToNullable(location), Optional.ToList(passwords), username.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs index 8f874b35a34bd..29e369f3cec46 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs @@ -20,21 +20,21 @@ internal MachineLearningContainerRegistryCredentials() } /// Initializes a new instance of MachineLearningContainerRegistryCredentials. - /// - /// + /// The location of the workspace ACR. /// - internal MachineLearningContainerRegistryCredentials(AzureLocation? location, string username, IReadOnlyList passwords) + /// The username of the workspace ACR. + internal MachineLearningContainerRegistryCredentials(AzureLocation? location, IReadOnlyList passwords, string username) { Location = location; - Username = username; Passwords = passwords; + Username = username; } - /// Gets the location. + /// The location of the workspace ACR. public AzureLocation? Location { get; } - /// Gets the username. - public string Username { get; } /// Gets the passwords. public IReadOnlyList Passwords { get; } + /// The username of the workspace ACR. + public string Username { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerType.cs index 68f6d35260d42..0ab00b7d8fd5b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The MachineLearningContainerType. + /// The type of container to retrieve logs from. public readonly partial struct MachineLearningContainerType : IEquatable { private readonly string _value; @@ -24,11 +24,14 @@ public MachineLearningContainerType(string value) private const string StorageInitializerValue = "StorageInitializer"; private const string InferenceServerValue = "InferenceServer"; + private const string ModelDataCollectorValue = "ModelDataCollector"; - /// StorageInitializer. + /// The container used to download models and score script. public static MachineLearningContainerType StorageInitializer { get; } = new MachineLearningContainerType(StorageInitializerValue); - /// InferenceServer. + /// The container used to serve user's request. public static MachineLearningContainerType InferenceServer { get; } = new MachineLearningContainerType(InferenceServerValue); + /// The container used to collect payload and custom logging when mdc is enabled. + public static MachineLearningContainerType ModelDataCollector { get; } = new MachineLearningContainerType(ModelDataCollectorValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningContainerType left, MachineLearningContainerType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs index 0913c4fc3ce0a..796f750591ac3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs @@ -16,6 +16,42 @@ public partial class MachineLearningCustomModelJobOutput : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + if (AssetName != null) + { + writer.WritePropertyName("assetName"u8); + writer.WriteStringValue(AssetName); + } + else + { + writer.WriteNull("assetName"); + } + } + if (Optional.IsDefined(AssetVersion)) + { + if (AssetVersion != null) + { + writer.WritePropertyName("assetVersion"u8); + writer.WriteStringValue(AssetVersion); + } + else + { + writer.WriteNull("assetVersion"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,12 +92,45 @@ internal static MachineLearningCustomModelJobOutput DeserializeMachineLearningCu { return null; } + Optional assetName = default; + Optional assetVersion = default; + Optional autoDeleteSetting = default; Optional mode = default; Optional uri = default; Optional description = default; JobOutputType jobOutputType = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("assetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetName = null; + continue; + } + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetVersion = null; + continue; + } + assetVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,7 +166,7 @@ internal static MachineLearningCustomModelJobOutput DeserializeMachineLearningCu continue; } } - return new MachineLearningCustomModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + return new MachineLearningCustomModelJobOutput(description.Value, jobOutputType, assetName.Value, assetVersion.Value, autoDeleteSetting.Value, Optional.ToNullable(mode), uri.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs index e07690434e860..62792e60b3ced 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs @@ -21,15 +21,27 @@ public MachineLearningCustomModelJobOutput() /// Initializes a new instance of MachineLearningCustomModelJobOutput. /// Description for the output. /// [Required] Specifies the type of job. + /// Output Asset Name. + /// Output Asset Version. + /// Auto delete setting of output data asset. /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningCustomModelJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + internal MachineLearningCustomModelJobOutput(string description, JobOutputType jobOutputType, string assetName, string assetVersion, AutoDeleteSetting autoDeleteSetting, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) { + AssetName = assetName; + AssetVersion = assetVersion; + AutoDeleteSetting = autoDeleteSetting; Mode = mode; Uri = uri; JobOutputType = jobOutputType; } + /// Output Asset Name. + public string AssetName { get; set; } + /// Output Asset Version. + public string AssetVersion { get; set; } + /// Auto delete setting of output data asset. + public AutoDeleteSetting AutoDeleteSetting { get; set; } /// Output Asset Delivery Mode. public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionCollectionGetAllOptions.cs new file mode 100644 index 0000000000000..23d154543d509 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionCollectionGetAllOptions.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningDataVersionCollectionGetAllOptions. + public partial class MachineLearningDataVersionCollectionGetAllOptions + { + /// Initializes a new instance of MachineLearningDataVersionCollectionGetAllOptions. + public MachineLearningDataVersionCollectionGetAllOptions() + { + } + + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + public string OrderBy { get; set; } + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + public int? Top { get; set; } + /// Continuation token for pagination. + public string Skip { get; set; } + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + public string Tags { get; set; } + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + public MachineLearningListViewType? ListViewType { get; set; } + /// data stage. + public string Stage { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs index a0dc5e5833e68..61034e61f92c6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs @@ -21,6 +21,42 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -99,6 +135,9 @@ internal static MachineLearningDataVersionProperties DeserializeMachineLearningD } MachineLearningDataType dataType = default; Uri dataUri = default; + Optional intellectualProperty = default; + Optional stage = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -116,6 +155,36 @@ internal static MachineLearningDataVersionProperties DeserializeMachineLearningD dataUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -175,7 +244,7 @@ internal static MachineLearningDataVersionProperties DeserializeMachineLearningD continue; } } - return new MachineLearningDataVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); + return new MachineLearningDataVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, intellectualProperty.Value, stage.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs index 82566a1c7079d..748aeb62ff706 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs @@ -19,7 +19,7 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningDataVersionProperties : MachineLearningAssetBase { /// Initializes a new instance of MachineLearningDataVersionProperties. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. /// is null. public MachineLearningDataVersionProperties(Uri dataUri) { @@ -32,19 +32,28 @@ public MachineLearningDataVersionProperties(Uri dataUri) /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - internal MachineLearningDataVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived) + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Intellectual Property details. Used if data is an Intellectual Property. + /// Stage in the data lifecycle assigned to this data asset. + internal MachineLearningDataVersionProperties(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IntellectualProperty intellectualProperty, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived) { DataType = dataType; DataUri = dataUri; + IntellectualProperty = intellectualProperty; + Stage = stage; } /// [Required] Specifies the type of data. internal MachineLearningDataType DataType { get; set; } - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. public Uri DataUri { get; set; } + /// Intellectual Property details. Used if data is an Intellectual Property. + public IntellectualProperty IntellectualProperty { get; set; } + /// Stage in the data lifecycle assigned to this data asset. + public string Stage { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.Serialization.cs index 5e8c1c28d2fac..856ca1bc54ec1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.Serialization.cs @@ -32,6 +32,8 @@ internal static MachineLearningDatastoreCredentials DeserializeMachineLearningDa { case "AccountKey": return MachineLearningAccountKeyDatastoreCredentials.DeserializeMachineLearningAccountKeyDatastoreCredentials(element); case "Certificate": return MachineLearningCertificateDatastoreCredentials.DeserializeMachineLearningCertificateDatastoreCredentials(element); + case "KerberosKeytab": return KerberosKeytabCredentials.DeserializeKerberosKeytabCredentials(element); + case "KerberosPassword": return KerberosPasswordCredentials.DeserializeKerberosPasswordCredentials(element); case "None": return MachineLearningNoneDatastoreCredentials.DeserializeMachineLearningNoneDatastoreCredentials(element); case "Sas": return MachineLearningSasDatastoreCredentials.DeserializeMachineLearningSasDatastoreCredentials(element); case "ServicePrincipal": return MachineLearningServicePrincipalDatastoreCredentials.DeserializeMachineLearningServicePrincipalDatastoreCredentials(element); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.cs index b8a26ceaebc6f..7bf7293f65a4f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Base definition for datastore credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// public abstract partial class MachineLearningDatastoreCredentials { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs index b8fceda0ec70a..c3b52adb8e206 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs @@ -20,6 +20,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(Credentials); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -85,10 +97,13 @@ internal static MachineLearningDatastoreProperties DeserializeMachineLearningDat case "AzureDataLakeGen1": return MachineLearningAzureDataLakeGen1Datastore.DeserializeMachineLearningAzureDataLakeGen1Datastore(element); case "AzureDataLakeGen2": return MachineLearningAzureDataLakeGen2Datastore.DeserializeMachineLearningAzureDataLakeGen2Datastore(element); case "AzureFile": return MachineLearningAzureFileDatastore.DeserializeMachineLearningAzureFileDatastore(element); + case "Hdfs": return HdfsDatastore.DeserializeHdfsDatastore(element); + case "OneLake": return OneLakeDatastore.DeserializeOneLakeDatastore(element); } } MachineLearningDatastoreCredentials credentials = default; DatastoreType datastoreType = default; + Optional intellectualProperty = default; Optional isDefault = default; Optional description = default; Optional> properties = default; @@ -105,6 +120,16 @@ internal static MachineLearningDatastoreProperties DeserializeMachineLearningDat datastoreType = new DatastoreType(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } if (property.NameEquals("isDefault"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -155,7 +180,7 @@ internal static MachineLearningDatastoreProperties DeserializeMachineLearningDat continue; } } - return new MachineLearningDatastoreProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault)); + return new MachineLearningDatastoreProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, intellectualProperty.Value, Optional.ToNullable(isDefault)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs index e8cf39ae306a6..da8203dd98913 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Base definition for datastore contents configuration. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// public partial class MachineLearningDatastoreProperties : MachineLearningResourceBase { @@ -22,7 +22,7 @@ public partial class MachineLearningDatastoreProperties : MachineLearningResourc /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// is null. public MachineLearningDatastoreProperties(MachineLearningDatastoreCredentials credentials) @@ -39,25 +39,29 @@ public MachineLearningDatastoreProperties(MachineLearningDatastoreCredentials cr /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// /// [Required] Storage type backing the datastore. + /// Intellectual Property details. /// Readonly property to indicate if datastore is the workspace default datastore. - internal MachineLearningDatastoreProperties(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault) : base(description, properties, tags) + internal MachineLearningDatastoreProperties(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, IntellectualProperty intellectualProperty, bool? isDefault) : base(description, properties, tags) { Credentials = credentials; DatastoreType = datastoreType; + IntellectualProperty = intellectualProperty; IsDefault = isDefault; } /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , and . /// public MachineLearningDatastoreCredentials Credentials { get; set; } /// [Required] Storage type backing the datastore. internal DatastoreType DatastoreType { get; set; } + /// Intellectual Property details. + public IntellectualProperty IntellectualProperty { get; set; } /// Readonly property to indicate if datastore is the workspace default datastore. public bool? IsDefault { get; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.Serialization.cs index 168497b880c22..28439e7cb6ecb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.Serialization.cs @@ -31,6 +31,8 @@ internal static MachineLearningDatastoreSecrets DeserializeMachineLearningDatast switch (discriminator.GetString()) { case "Certificate": return MachineLearningCertificateDatastoreSecrets.DeserializeMachineLearningCertificateDatastoreSecrets(element); + case "KerberosKeytab": return KerberosKeytabSecrets.DeserializeKerberosKeytabSecrets(element); + case "KerberosPassword": return KerberosPasswordSecrets.DeserializeKerberosPasswordSecrets(element); case "Sas": return MachineLearningSasDatastoreSecrets.DeserializeMachineLearningSasDatastoreSecrets(element); case "ServicePrincipal": return MachineLearningServicePrincipalDatastoreSecrets.DeserializeMachineLearningServicePrincipalDatastoreSecrets(element); case "AccountKey": return MachineLearningAccountKeyDatastoreSecrets.DeserializeMachineLearningAccountKeyDatastoreSecrets(element); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.cs index 10b9d278059d3..45ec39f64c705 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Base definition for datastore secrets. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// public abstract partial class MachineLearningDatastoreSecrets { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.Serialization.cs index 370dcabf4be51..7ee4f96850cca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.Serialization.cs @@ -34,6 +34,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("instanceType"); } } + if (Optional.IsCollectionDefined(Locations)) + { + if (Locations != null) + { + writer.WritePropertyName("locations"u8); + writer.WriteStartArray(); + foreach (var item in Locations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("locations"); + } + } + if (Optional.IsDefined(MaxInstanceCount)) + { + if (MaxInstanceCount != null) + { + writer.WritePropertyName("maxInstanceCount"u8); + writer.WriteNumberValue(MaxInstanceCount.Value); + } + else + { + writer.WriteNull("maxInstanceCount"); + } + } if (Optional.IsCollectionDefined(Properties)) { if (Properties != null) @@ -72,6 +101,8 @@ internal static MachineLearningDeploymentResourceConfiguration DeserializeMachin } Optional instanceCount = default; Optional instanceType = default; + Optional> locations = default; + Optional maxInstanceCount = default; Optional> properties = default; foreach (var property in element.EnumerateObject()) { @@ -94,6 +125,31 @@ internal static MachineLearningDeploymentResourceConfiguration DeserializeMachin instanceType = property.Value.GetString(); continue; } + if (property.NameEquals("locations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + locations = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + locations = array; + continue; + } + if (property.NameEquals("maxInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxInstanceCount = null; + continue; + } + maxInstanceCount = property.Value.GetInt32(); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -117,7 +173,7 @@ internal static MachineLearningDeploymentResourceConfiguration DeserializeMachin continue; } } - return new MachineLearningDeploymentResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties)); + return new MachineLearningDeploymentResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToList(locations), Optional.ToNullable(maxInstanceCount), Optional.ToDictionary(properties)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.cs index d1a61242d57a7..cc423af8e7e1a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.cs @@ -21,8 +21,13 @@ public MachineLearningDeploymentResourceConfiguration() /// Initializes a new instance of MachineLearningDeploymentResourceConfiguration. /// Optional number of instances or nodes used by the compute target. /// Optional type of VM used as supported by the compute target. + /// Locations where the job can run. + /// + /// Optional max allowed number of instances or nodes to be used by the compute target. + /// For use with elastic training, currently supported by PyTorch distribution type only. + /// /// Additional properties bag. - internal MachineLearningDeploymentResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties) : base(instanceCount, instanceType, properties) + internal MachineLearningDeploymentResourceConfiguration(int? instanceCount, string instanceType, IList locations, int? maxInstanceCount, IDictionary properties) : base(instanceCount, instanceType, locations, maxInstanceCount, properties) { } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.Serialization.cs index 3027af20c4481..5727fc58774f5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.Serialization.cs @@ -32,6 +32,7 @@ internal static MachineLearningDistributionConfiguration DeserializeMachineLearn { case "Mpi": return MpiDistributionConfiguration.DeserializeMpiDistributionConfiguration(element); case "PyTorch": return PyTorchDistributionConfiguration.DeserializePyTorchDistributionConfiguration(element); + case "Ray": return RayDistributionConfiguration.DeserializeRayDistributionConfiguration(element); case "TensorFlow": return TensorFlowDistributionConfiguration.DeserializeTensorFlowDistributionConfiguration(element); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.cs index a06080b1ff9aa..c2cb3df0f1c0f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Base definition for job distribution configuration. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// public abstract partial class MachineLearningDistributionConfiguration { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs index 1d92fa063af0a..922ed3cd23786 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs @@ -15,15 +15,15 @@ public partial class MachineLearningEncryptionKeyVaultProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("keyVaultArmId"u8); - writer.WriteStringValue(KeyVaultArmId); - writer.WritePropertyName("keyIdentifier"u8); - writer.WriteStringValue(KeyIdentifier); if (Optional.IsDefined(IdentityClientId)) { writer.WritePropertyName("identityClientId"u8); writer.WriteStringValue(IdentityClientId); } + writer.WritePropertyName("keyIdentifier"u8); + writer.WriteStringValue(KeyIdentifier); + writer.WritePropertyName("keyVaultArmId"u8); + writer.WriteStringValue(KeyVaultArmId); writer.WriteEndObject(); } @@ -33,14 +33,14 @@ internal static MachineLearningEncryptionKeyVaultProperties DeserializeMachineLe { return null; } - ResourceIdentifier keyVaultArmId = default; - string keyIdentifier = default; Optional identityClientId = default; + string keyIdentifier = default; + ResourceIdentifier keyVaultArmId = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("keyVaultArmId"u8)) + if (property.NameEquals("identityClientId"u8)) { - keyVaultArmId = new ResourceIdentifier(property.Value.GetString()); + identityClientId = property.Value.GetString(); continue; } if (property.NameEquals("keyIdentifier"u8)) @@ -48,13 +48,13 @@ internal static MachineLearningEncryptionKeyVaultProperties DeserializeMachineLe keyIdentifier = property.Value.GetString(); continue; } - if (property.NameEquals("identityClientId"u8)) + if (property.NameEquals("keyVaultArmId"u8)) { - identityClientId = property.Value.GetString(); + keyVaultArmId = new ResourceIdentifier(property.Value.GetString()); continue; } } - return new MachineLearningEncryptionKeyVaultProperties(keyVaultArmId, keyIdentifier, identityClientId.Value); + return new MachineLearningEncryptionKeyVaultProperties(identityClientId.Value, keyIdentifier, keyVaultArmId); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs index 7b844700c6ef0..c6618de439585 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs @@ -10,38 +10,44 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The MachineLearningEncryptionKeyVaultProperties. + /// Customer Key vault properties. public partial class MachineLearningEncryptionKeyVaultProperties { /// Initializes a new instance of MachineLearningEncryptionKeyVaultProperties. - /// The ArmId of the keyVault where the customer owned encryption key is present. - /// Key vault uri to access the encryption key. - /// or is null. - public MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier) + /// KeyVault key identifier to encrypt the data. + /// KeyVault Arm Id that contains the data encryption key. + /// or is null. + public MachineLearningEncryptionKeyVaultProperties(string keyIdentifier, ResourceIdentifier keyVaultArmId) { - Argument.AssertNotNull(keyVaultArmId, nameof(keyVaultArmId)); Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); + Argument.AssertNotNull(keyVaultArmId, nameof(keyVaultArmId)); - KeyVaultArmId = keyVaultArmId; KeyIdentifier = keyIdentifier; + KeyVaultArmId = keyVaultArmId; } /// Initializes a new instance of MachineLearningEncryptionKeyVaultProperties. - /// The ArmId of the keyVault where the customer owned encryption key is present. - /// Key vault uri to access the encryption key. - /// For future use - The client id of the identity which will be used to access key vault. - internal MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier, string identityClientId) + /// + /// Currently, we support only SystemAssigned MSI. + /// We need this when we support UserAssignedIdentities + /// + /// KeyVault key identifier to encrypt the data. + /// KeyVault Arm Id that contains the data encryption key. + internal MachineLearningEncryptionKeyVaultProperties(string identityClientId, string keyIdentifier, ResourceIdentifier keyVaultArmId) { - KeyVaultArmId = keyVaultArmId; - KeyIdentifier = keyIdentifier; IdentityClientId = identityClientId; + KeyIdentifier = keyIdentifier; + KeyVaultArmId = keyVaultArmId; } - /// The ArmId of the keyVault where the customer owned encryption key is present. - public ResourceIdentifier KeyVaultArmId { get; set; } - /// Key vault uri to access the encryption key. - public string KeyIdentifier { get; set; } - /// For future use - The client id of the identity which will be used to access key vault. + /// + /// Currently, we support only SystemAssigned MSI. + /// We need this when we support UserAssignedIdentities + /// public string IdentityClientId { get; set; } + /// KeyVault key identifier to encrypt the data. + public string KeyIdentifier { get; set; } + /// KeyVault Arm Id that contains the data encryption key. + public ResourceIdentifier KeyVaultArmId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs index 70a5980716e3c..1b9418781ec04 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs @@ -15,8 +15,11 @@ public partial class MachineLearningEncryptionSetting : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(CosmosDBResourceId)) + { + writer.WritePropertyName("cosmosDbResourceId"u8); + writer.WriteStringValue(CosmosDBResourceId); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -24,6 +27,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("keyVaultProperties"u8); writer.WriteObjectValue(KeyVaultProperties); + if (Optional.IsDefined(SearchAccountResourceId)) + { + writer.WritePropertyName("searchAccountResourceId"u8); + writer.WriteStringValue(SearchAccountResourceId); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(StorageAccountResourceId)) + { + writer.WritePropertyName("storageAccountResourceId"u8); + writer.WriteStringValue(StorageAccountResourceId); + } writer.WriteEndObject(); } @@ -33,14 +48,21 @@ internal static MachineLearningEncryptionSetting DeserializeMachineLearningEncry { return null; } - MachineLearningEncryptionStatus status = default; + Optional cosmosDbResourceId = default; Optional identity = default; MachineLearningEncryptionKeyVaultProperties keyVaultProperties = default; + Optional searchAccountResourceId = default; + MachineLearningEncryptionStatus status = default; + Optional storageAccountResourceId = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("status"u8)) + if (property.NameEquals("cosmosDbResourceId"u8)) { - status = new MachineLearningEncryptionStatus(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cosmosDbResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("identity"u8)) @@ -57,8 +79,31 @@ internal static MachineLearningEncryptionSetting DeserializeMachineLearningEncry keyVaultProperties = MachineLearningEncryptionKeyVaultProperties.DeserializeMachineLearningEncryptionKeyVaultProperties(property.Value); continue; } + if (property.NameEquals("searchAccountResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchAccountResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new MachineLearningEncryptionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageAccountResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageAccountResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } } - return new MachineLearningEncryptionSetting(status, identity.Value, keyVaultProperties); + return new MachineLearningEncryptionSetting(cosmosDbResourceId.Value, identity.Value, keyVaultProperties, searchAccountResourceId.Value, status, storageAccountResourceId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs index dd5144ea614c3..e1c0f1b6428ea 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs @@ -14,33 +14,51 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningEncryptionSetting { /// Initializes a new instance of MachineLearningEncryptionSetting. + /// KeyVault details to do the encryption. /// Indicates whether or not the encryption is enabled for the workspace. - /// Customer Key vault properties. /// is null. - public MachineLearningEncryptionSetting(MachineLearningEncryptionStatus status, MachineLearningEncryptionKeyVaultProperties keyVaultProperties) + public MachineLearningEncryptionSetting(MachineLearningEncryptionKeyVaultProperties keyVaultProperties, MachineLearningEncryptionStatus status) { Argument.AssertNotNull(keyVaultProperties, nameof(keyVaultProperties)); - Status = status; KeyVaultProperties = keyVaultProperties; + Status = status; } /// Initializes a new instance of MachineLearningEncryptionSetting. + /// + /// The byok cosmosdb account that customer brings to store customer's data + /// with encryption + /// + /// Identity to be used with the keyVault. + /// KeyVault details to do the encryption. + /// + /// The byok search account that customer brings to store customer's data + /// with encryption + /// /// Indicates whether or not the encryption is enabled for the workspace. - /// The identity that will be used to access the key vault for encryption at rest. - /// Customer Key vault properties. - internal MachineLearningEncryptionSetting(MachineLearningEncryptionStatus status, MachineLearningCmkIdentity identity, MachineLearningEncryptionKeyVaultProperties keyVaultProperties) + /// + /// The byok storage account that customer brings to store customer's data + /// with encryption + /// + internal MachineLearningEncryptionSetting(ResourceIdentifier cosmosDBResourceId, MachineLearningCmkIdentity identity, MachineLearningEncryptionKeyVaultProperties keyVaultProperties, ResourceIdentifier searchAccountResourceId, MachineLearningEncryptionStatus status, ResourceIdentifier storageAccountResourceId) { - Status = status; + CosmosDBResourceId = cosmosDBResourceId; Identity = identity; KeyVaultProperties = keyVaultProperties; + SearchAccountResourceId = searchAccountResourceId; + Status = status; + StorageAccountResourceId = storageAccountResourceId; } - /// Indicates whether or not the encryption is enabled for the workspace. - public MachineLearningEncryptionStatus Status { get; set; } - /// The identity that will be used to access the key vault for encryption at rest. + /// + /// The byok cosmosdb account that customer brings to store customer's data + /// with encryption + /// + public ResourceIdentifier CosmosDBResourceId { get; set; } + /// Identity to be used with the keyVault. internal MachineLearningCmkIdentity Identity { get; set; } - /// 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. public ResourceIdentifier UserAssignedIdentity { get => Identity is null ? default : Identity.UserAssignedIdentity; @@ -52,7 +70,19 @@ public ResourceIdentifier UserAssignedIdentity } } - /// Customer Key vault properties. + /// KeyVault details to do the encryption. public MachineLearningEncryptionKeyVaultProperties KeyVaultProperties { get; set; } + /// + /// The byok search account that customer brings to store customer's data + /// with encryption + /// + public ResourceIdentifier SearchAccountResourceId { get; set; } + /// Indicates whether or not the encryption is enabled for the workspace. + public MachineLearningEncryptionStatus Status { get; set; } + /// + /// The byok storage account that customer brings to store customer's data + /// with encryption + /// + public ResourceIdentifier StorageAccountResourceId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs index 0abfb0e86f0ce..5eda68fafe8f4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs @@ -23,7 +23,7 @@ public MachineLearningEndpointDeploymentProperties() /// Initializes a new instance of MachineLearningEndpointDeploymentProperties. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. internal MachineLearningEndpointDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties) @@ -39,7 +39,7 @@ internal MachineLearningEndpointDeploymentProperties(MachineLearningCodeConfigur public MachineLearningCodeConfiguration CodeConfiguration { get; set; } /// Description of the endpoint deployment. public string Description { get; set; } - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. public string EnvironmentId { get; set; } /// Environment variables configuration for the deployment. public IDictionary EnvironmentVariables { get; set; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs index 7842c34765905..b6c4c376ceb33 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs @@ -78,6 +78,7 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine { return null; } + Optional provisioningState = default; Optional isArchived = default; Optional latestVersion = default; Optional nextVersion = default; @@ -86,6 +87,15 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine Optional> tags = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -156,7 +166,7 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine continue; } } - return new MachineLearningEnvironmentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + return new MachineLearningEnvironmentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs index 715e6a475798c..65dc844576028 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs @@ -24,8 +24,13 @@ public MachineLearningEnvironmentContainerProperties() /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. - internal MachineLearningEnvironmentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + /// Provisioning state for the environment container. + internal MachineLearningEnvironmentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, isArchived, latestVersion, nextVersion) { + ProvisioningState = provisioningState; } + + /// Provisioning state for the environment container. + public RegistryAssetProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs index 510d928d3c424..93004bf39b0f4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs @@ -41,11 +41,47 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("inferenceConfig"u8); writer.WriteObjectValue(InferenceConfig); } + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } if (Optional.IsDefined(OSType)) { writer.WritePropertyName("osType"u8); writer.WriteStringValue(OSType.Value.ToString()); } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -119,7 +155,11 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe Optional environmentType = default; Optional image = default; Optional inferenceConfig = default; + Optional intellectualProperty = default; Optional osType = default; + Optional provisioningState = default; + Optional stage = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -173,6 +213,16 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe inferenceConfig = MachineLearningInferenceContainerProperties.DeserializeMachineLearningInferenceContainerProperties(property.Value); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } if (property.NameEquals("osType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -182,6 +232,35 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe osType = new MachineLearningOperatingSystemType(property.Value.GetString()); continue; } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -241,7 +320,7 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe continue; } } - return new MachineLearningEnvironmentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToNullable(autoRebuild), build.Value, condaFile.Value, Optional.ToNullable(environmentType), image.Value, inferenceConfig.Value, Optional.ToNullable(osType)); + return new MachineLearningEnvironmentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToNullable(autoRebuild), build.Value, condaFile.Value, Optional.ToNullable(environmentType), image.Value, inferenceConfig.Value, intellectualProperty.Value, Optional.ToNullable(osType), Optional.ToNullable(provisioningState), stage.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs index d5fd90eee2781..49d1851d74d30 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs @@ -21,8 +21,9 @@ public MachineLearningEnvironmentVersionProperties() /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// Defines if image needs to be rebuilt based on base image changes. /// Configuration settings for Docker build context. /// @@ -38,8 +39,11 @@ public MachineLearningEnvironmentVersionProperties() /// <seealso href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" /> /// /// Defines configuration specific to inference. + /// Intellectual Property details. Used if environment is an Intellectual Property. /// The OS type of the environment. - internal MachineLearningEnvironmentVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, AutoRebuildSetting? autoRebuild, MachineLearningBuildContext build, string condaFile, MachineLearningEnvironmentType? environmentType, string image, MachineLearningInferenceContainerProperties inferenceConfig, MachineLearningOperatingSystemType? osType) : base(description, properties, tags, isAnonymous, isArchived) + /// Provisioning state for the environment version. + /// Stage in the environment lifecycle assigned to this environment. + internal MachineLearningEnvironmentVersionProperties(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, AutoRebuildSetting? autoRebuild, MachineLearningBuildContext build, string condaFile, MachineLearningEnvironmentType? environmentType, string image, MachineLearningInferenceContainerProperties inferenceConfig, IntellectualProperty intellectualProperty, MachineLearningOperatingSystemType? osType, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived) { AutoRebuild = autoRebuild; Build = build; @@ -47,7 +51,10 @@ internal MachineLearningEnvironmentVersionProperties(string description, IDictio EnvironmentType = environmentType; Image = image; InferenceConfig = inferenceConfig; + IntellectualProperty = intellectualProperty; OSType = osType; + ProvisioningState = provisioningState; + Stage = stage; } /// Defines if image needs to be rebuilt based on base image changes. @@ -71,7 +78,13 @@ internal MachineLearningEnvironmentVersionProperties(string description, IDictio public string Image { get; set; } /// Defines configuration specific to inference. public MachineLearningInferenceContainerProperties InferenceConfig { get; set; } + /// Intellectual Property details. Used if environment is an Intellectual Property. + public IntellectualProperty IntellectualProperty { get; set; } /// The OS type of the environment. public MachineLearningOperatingSystemType? OSType { get; set; } + /// Provisioning state for the environment version. + public RegistryAssetProvisioningState? ProvisioningState { get; } + /// Stage in the environment lifecycle assigned to this environment. + public string Stage { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureData.Serialization.cs new file mode 100644 index 0000000000000..128724d0cbc6e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningFeatureData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureData DeserializeMachineLearningFeatureData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MachineLearningFeatureProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = MachineLearningFeatureProperties.DeserializeMachineLearningFeatureProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new MachineLearningFeatureData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs new file mode 100644 index 0000000000000..f957ac91f4d93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFeatureProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DataType)) + { + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.Value.ToString()); + } + if (Optional.IsDefined(FeatureName)) + { + if (FeatureName != null) + { + writer.WritePropertyName("featureName"u8); + writer.WriteStringValue(FeatureName); + } + else + { + writer.WriteNull("featureName"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureProperties DeserializeMachineLearningFeatureProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional dataType = default; + Optional featureName = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataType = new FeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("featureName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureName = null; + continue; + } + featureName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new MachineLearningFeatureProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(dataType), featureName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs new file mode 100644 index 0000000000000..27b6f2c260da2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing feature. + public partial class MachineLearningFeatureProperties : MachineLearningResourceBase + { + /// Initializes a new instance of MachineLearningFeatureProperties. + public MachineLearningFeatureProperties() + { + } + + /// Initializes a new instance of MachineLearningFeatureProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies type. + /// Specifies name. + internal MachineLearningFeatureProperties(string description, IDictionary properties, IDictionary tags, FeatureDataType? dataType, string featureName) : base(description, properties, tags) + { + DataType = dataType; + FeatureName = featureName; + } + + /// Specifies type. + public FeatureDataType? DataType { get; set; } + /// Specifies name. + public string FeatureName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerCollectionGetAllOptions.cs new file mode 100644 index 0000000000000..66fe47a2b4628 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerCollectionGetAllOptions.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningFeatureSetContainerCollectionGetAllOptions. + public partial class MachineLearningFeatureSetContainerCollectionGetAllOptions + { + /// Initializes a new instance of MachineLearningFeatureSetContainerCollectionGetAllOptions. + public MachineLearningFeatureSetContainerCollectionGetAllOptions() + { + } + + /// Continuation token for pagination. + public string Skip { get; set; } + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + public string Tags { get; set; } + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + public MachineLearningListViewType? ListViewType { get; set; } + /// page size. + public int? PageSize { get; set; } + /// name for the featureset. + public string Name { get; set; } + /// description for the feature set. + public string Description { get; set; } + /// createdBy user name. + public string CreatedBy { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerData.Serialization.cs new file mode 100644 index 0000000000000..8d02b0d270972 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningFeatureSetContainerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureSetContainerData DeserializeMachineLearningFeatureSetContainerData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MachineLearningFeatureSetContainerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = MachineLearningFeatureSetContainerProperties.DeserializeMachineLearningFeatureSetContainerProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new MachineLearningFeatureSetContainerData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs new file mode 100644 index 0000000000000..9d58e6d19f910 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFeatureSetContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureSetContainerProperties DeserializeMachineLearningFeatureSetContainerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("isArchived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new MachineLearningFeatureSetContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs new file mode 100644 index 0000000000000..c55abe18e1e6f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing feature set. + public partial class MachineLearningFeatureSetContainerProperties : MachineLearningAssetContainer + { + /// Initializes a new instance of MachineLearningFeatureSetContainerProperties. + public MachineLearningFeatureSetContainerProperties() + { + } + + /// Initializes a new instance of MachineLearningFeatureSetContainerProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the featureset container. + internal MachineLearningFeatureSetContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + { + ProvisioningState = provisioningState; + } + + /// Provisioning state for the featureset container. + public RegistryAssetProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.Serialization.cs new file mode 100644 index 0000000000000..b8b50482858db --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.Serialization.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFeatureSetJob + { + internal static MachineLearningFeatureSetJob DeserializeMachineLearningFeatureSetJob(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional createdDate = default; + Optional displayName = default; + Optional duration = default; + Optional experimentId = default; + Optional featureWindow = default; + Optional jobId = default; + Optional status = default; + Optional> tags = default; + Optional type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + createdDate = null; + continue; + } + createdDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("displayName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("duration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + duration = null; + continue; + } + duration = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("experimentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + experimentId = null; + continue; + } + experimentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("featureWindow"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureWindow = null; + continue; + } + featureWindow = FeatureWindow.DeserializeFeatureWindow(property.Value); + continue; + } + if (property.NameEquals("jobId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jobId = null; + continue; + } + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new MachineLearningJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new FeatureStoreJobType(property.Value.GetString()); + continue; + } + } + return new MachineLearningFeatureSetJob(Optional.ToNullable(createdDate), displayName.Value, Optional.ToNullable(duration), experimentId.Value, featureWindow.Value, jobId.Value, Optional.ToNullable(status), Optional.ToDictionary(tags), Optional.ToNullable(type)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.cs new file mode 100644 index 0000000000000..c9ca8d274df07 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetJob.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing the feature set job. + public partial class MachineLearningFeatureSetJob + { + /// Initializes a new instance of MachineLearningFeatureSetJob. + internal MachineLearningFeatureSetJob() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningFeatureSetJob. + /// Specifies the created date. + /// Specifies the display name. + /// Specifies the duration. + /// Specifies the experiment id. + /// Specifies the backfill feature window to be materialized. + /// Specifies the job id. + /// Specifies the job status. + /// Specifies the tags if any. + /// Specifies the feature store job type. + internal MachineLearningFeatureSetJob(DateTimeOffset? createdOn, string displayName, TimeSpan? duration, string experimentId, FeatureWindow featureWindow, string jobId, MachineLearningJobStatus? status, IReadOnlyDictionary tags, FeatureStoreJobType? featureStoreJobType) + { + CreatedOn = createdOn; + DisplayName = displayName; + Duration = duration; + ExperimentId = experimentId; + FeatureWindow = featureWindow; + JobId = jobId; + Status = status; + Tags = tags; + FeatureStoreJobType = featureStoreJobType; + } + + /// Specifies the created date. + public DateTimeOffset? CreatedOn { get; } + /// Specifies the display name. + public string DisplayName { get; } + /// Specifies the duration. + public TimeSpan? Duration { get; } + /// Specifies the experiment id. + public string ExperimentId { get; } + /// Specifies the backfill feature window to be materialized. + public FeatureWindow FeatureWindow { get; } + /// Specifies the job id. + public string JobId { get; } + /// Specifies the job status. + public MachineLearningJobStatus? Status { get; } + /// Specifies the tags if any. + public IReadOnlyDictionary Tags { get; } + /// Specifies the feature store job type. + public FeatureStoreJobType? FeatureStoreJobType { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionCollectionGetAllOptions.cs new file mode 100644 index 0000000000000..b30f3de95f985 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionCollectionGetAllOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningFeatureSetVersionCollectionGetAllOptions. + public partial class MachineLearningFeatureSetVersionCollectionGetAllOptions + { + /// Initializes a new instance of MachineLearningFeatureSetVersionCollectionGetAllOptions. + public MachineLearningFeatureSetVersionCollectionGetAllOptions() + { + } + + /// Continuation token for pagination. + public string Skip { get; set; } + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + public string Tags { get; set; } + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + public MachineLearningListViewType? ListViewType { get; set; } + /// page size. + public int? PageSize { get; set; } + /// name for the featureset version. + public string VersionName { get; set; } + /// featureset version. + public string Version { get; set; } + /// description for the feature set version. + public string Description { get; set; } + /// createdBy user name. + public string CreatedBy { get; set; } + /// Specifies the featurestore stage. + public string Stage { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionData.Serialization.cs new file mode 100644 index 0000000000000..b291e1b33b3bd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningFeatureSetVersionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureSetVersionData DeserializeMachineLearningFeatureSetVersionData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MachineLearningFeatureSetVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = MachineLearningFeatureSetVersionProperties.DeserializeMachineLearningFeatureSetVersionProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new MachineLearningFeatureSetVersionData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs new file mode 100644 index 0000000000000..36cbca0dde771 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFeatureSetVersionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Entities)) + { + if (Entities != null) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("entities"); + } + } + if (Optional.IsDefined(MaterializationSettings)) + { + if (MaterializationSettings != null) + { + writer.WritePropertyName("materializationSettings"u8); + writer.WriteObjectValue(MaterializationSettings); + } + else + { + writer.WriteNull("materializationSettings"); + } + } + if (Optional.IsDefined(Specification)) + { + if (Specification != null) + { + writer.WritePropertyName("specification"u8); + writer.WriteObjectValue(Specification); + } + else + { + writer.WriteNull("specification"); + } + } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureSetVersionProperties DeserializeMachineLearningFeatureSetVersionProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> entities = default; + Optional materializationSettings = default; + Optional provisioningState = default; + Optional specification = default; + Optional stage = default; + Optional autoDeleteSetting = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + entities = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + entities = array; + continue; + } + if (property.NameEquals("materializationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + materializationSettings = null; + continue; + } + materializationSettings = MaterializationSettings.DeserializeMaterializationSettings(property.Value); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("specification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + specification = null; + continue; + } + specification = FeaturesetSpecification.DeserializeFeaturesetSpecification(property.Value); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } + if (property.NameEquals("isAnonymous"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new MachineLearningFeatureSetVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToList(entities), materializationSettings.Value, Optional.ToNullable(provisioningState), specification.Value, stage.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs new file mode 100644 index 0000000000000..91511e73304af --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing feature set version. + public partial class MachineLearningFeatureSetVersionProperties : MachineLearningAssetBase + { + /// Initializes a new instance of MachineLearningFeatureSetVersionProperties. + public MachineLearningFeatureSetVersionProperties() + { + Entities = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningFeatureSetVersionProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// Specifies list of entities. + /// Specifies the materialization settings. + /// Provisioning state for the featureset version container. + /// Specifies the feature spec details. + /// Specifies the asset stage. + internal MachineLearningFeatureSetVersionProperties(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, IList entities, MaterializationSettings materializationSettings, RegistryAssetProvisioningState? provisioningState, FeaturesetSpecification specification, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived) + { + Entities = entities; + MaterializationSettings = materializationSettings; + ProvisioningState = provisioningState; + Specification = specification; + Stage = stage; + } + + /// Specifies list of entities. + public IList Entities { get; set; } + /// Specifies the materialization settings. + public MaterializationSettings MaterializationSettings { get; set; } + /// Provisioning state for the featureset version container. + public RegistryAssetProvisioningState? ProvisioningState { get; } + /// Specifies the feature spec details. + internal FeaturesetSpecification Specification { get; set; } + /// Specifies the spec path. + public string SpecificationPath + { + get => Specification is null ? default : Specification.Path; + set + { + if (Specification is null) + Specification = new FeaturesetSpecification(); + Specification.Path = value; + } + } + + /// Specifies the asset stage. + public string Stage { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions.cs new file mode 100644 index 0000000000000..fc6ff3aa6bd85 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions. + public partial class MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions + { + /// Initializes a new instance of MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions. + public MachineLearningFeatureStoreEntityContainerCollectionGetAllOptions() + { + } + + /// Continuation token for pagination. + public string Skip { get; set; } + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + public string Tags { get; set; } + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + public MachineLearningListViewType? ListViewType { get; set; } + /// page size. + public int? PageSize { get; set; } + /// name for the featurestore entity. + public string Name { get; set; } + /// description for the featurestore entity. + public string Description { get; set; } + /// createdBy user name. + public string CreatedBy { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerData.Serialization.cs new file mode 100644 index 0000000000000..9bf6985bbcdb4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningFeatureStoreEntityContainerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureStoreEntityContainerData DeserializeMachineLearningFeatureStoreEntityContainerData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MachineLearningFeatureStoreEntityContainerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = MachineLearningFeatureStoreEntityContainerProperties.DeserializeMachineLearningFeatureStoreEntityContainerProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new MachineLearningFeatureStoreEntityContainerData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs new file mode 100644 index 0000000000000..8a45bf28e0d8c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFeatureStoreEntityContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureStoreEntityContainerProperties DeserializeMachineLearningFeatureStoreEntityContainerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("isArchived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new MachineLearningFeatureStoreEntityContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs new file mode 100644 index 0000000000000..927917acab3a8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing feature entity. + public partial class MachineLearningFeatureStoreEntityContainerProperties : MachineLearningAssetContainer + { + /// Initializes a new instance of MachineLearningFeatureStoreEntityContainerProperties. + public MachineLearningFeatureStoreEntityContainerProperties() + { + } + + /// Initializes a new instance of MachineLearningFeatureStoreEntityContainerProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the featurestore entity container. + internal MachineLearningFeatureStoreEntityContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + { + ProvisioningState = provisioningState; + } + + /// Provisioning state for the featurestore entity container. + public RegistryAssetProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs new file mode 100644 index 0000000000000..529bff6d111f9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFeatureStoreEntityVersionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(IndexColumns)) + { + if (IndexColumns != null) + { + writer.WritePropertyName("indexColumns"u8); + writer.WriteStartArray(); + foreach (var item in IndexColumns) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("indexColumns"); + } + } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningFeatureStoreEntityVersionProperties DeserializeMachineLearningFeatureStoreEntityVersionProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> indexColumns = default; + Optional provisioningState = default; + Optional stage = default; + Optional autoDeleteSetting = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("indexColumns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + indexColumns = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(IndexColumn.DeserializeIndexColumn(item)); + } + indexColumns = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } + if (property.NameEquals("isAnonymous"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new MachineLearningFeatureStoreEntityVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToList(indexColumns), Optional.ToNullable(provisioningState), stage.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs new file mode 100644 index 0000000000000..60edf266936b6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing feature entity version. + public partial class MachineLearningFeatureStoreEntityVersionProperties : MachineLearningAssetBase + { + /// Initializes a new instance of MachineLearningFeatureStoreEntityVersionProperties. + public MachineLearningFeatureStoreEntityVersionProperties() + { + IndexColumns = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningFeatureStoreEntityVersionProperties. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. + /// Specifies index columns. + /// Provisioning state for the featurestore entity version. + /// Specifies the asset stage. + internal MachineLearningFeatureStoreEntityVersionProperties(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, IList indexColumns, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived) + { + IndexColumns = indexColumns; + ProvisioningState = provisioningState; + Stage = stage; + } + + /// Specifies index columns. + public IList IndexColumns { get; set; } + /// Provisioning state for the featurestore entity version. + public RegistryAssetProvisioningState? ProvisioningState { get; } + /// Specifies the asset stage. + public string Stage { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions.cs new file mode 100644 index 0000000000000..e8c78a7716ed2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions. + public partial class MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions + { + /// Initializes a new instance of MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions. + public MachineLearningFeaturestoreEntityVersionCollectionGetAllOptions() + { + } + + /// Continuation token for pagination. + public string Skip { get; set; } + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + public string Tags { get; set; } + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + public MachineLearningListViewType? ListViewType { get; set; } + /// page size. + public int? PageSize { get; set; } + /// name for the featurestore entity version. + public string VersionName { get; set; } + /// featurestore entity version. + public string Version { get; set; } + /// description for the feature entity version. + public string Description { get; set; } + /// createdBy user name. + public string CreatedBy { get; set; } + /// Specifies the featurestore stage. + public string Stage { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionData.Serialization.cs new file mode 100644 index 0000000000000..d57e571b08170 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturestoreEntityVersionData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningFeaturestoreEntityVersionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningFeaturestoreEntityVersionData DeserializeMachineLearningFeaturestoreEntityVersionData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MachineLearningFeatureStoreEntityVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = MachineLearningFeatureStoreEntityVersionProperties.DeserializeMachineLearningFeatureStoreEntityVersionProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new MachineLearningFeaturestoreEntityVersionData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLogger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLogger.cs new file mode 100644 index 0000000000000..ee4c7de6c4def --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLogger.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Indicates whether mlflow autologger is enabled for notebooks. + public readonly partial struct MachineLearningFlowAutoLogger : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningFlowAutoLogger(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static MachineLearningFlowAutoLogger Enabled { get; } = new MachineLearningFlowAutoLogger(EnabledValue); + /// Disabled. + public static MachineLearningFlowAutoLogger Disabled { get; } = new MachineLearningFlowAutoLogger(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningFlowAutoLogger left, MachineLearningFlowAutoLogger right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningFlowAutoLogger left, MachineLearningFlowAutoLogger right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningFlowAutoLogger(string value) => new MachineLearningFlowAutoLogger(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningFlowAutoLogger other && Equals(other); + /// + public bool Equals(MachineLearningFlowAutoLogger other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLoggerState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLoggerState.cs new file mode 100644 index 0000000000000..f12dfdb42757a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLoggerState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine the state of mlflow autologger. + public readonly partial struct MachineLearningFlowAutoLoggerState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningFlowAutoLoggerState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static MachineLearningFlowAutoLoggerState Enabled { get; } = new MachineLearningFlowAutoLoggerState(EnabledValue); + /// Disabled. + public static MachineLearningFlowAutoLoggerState Disabled { get; } = new MachineLearningFlowAutoLoggerState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningFlowAutoLoggerState left, MachineLearningFlowAutoLoggerState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningFlowAutoLoggerState left, MachineLearningFlowAutoLoggerState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningFlowAutoLoggerState(string value) => new MachineLearningFlowAutoLoggerState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningFlowAutoLoggerState other && Equals(other); + /// + public bool Equals(MachineLearningFlowAutoLoggerState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs index 1f6b3240896e9..09fab28c585fe 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs @@ -16,6 +16,42 @@ public partial class MachineLearningFlowModelJobOutput : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + if (AssetName != null) + { + writer.WritePropertyName("assetName"u8); + writer.WriteStringValue(AssetName); + } + else + { + writer.WriteNull("assetName"); + } + } + if (Optional.IsDefined(AssetVersion)) + { + if (AssetVersion != null) + { + writer.WritePropertyName("assetVersion"u8); + writer.WriteStringValue(AssetVersion); + } + else + { + writer.WriteNull("assetVersion"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,12 +92,45 @@ internal static MachineLearningFlowModelJobOutput DeserializeMachineLearningFlow { return null; } + Optional assetName = default; + Optional assetVersion = default; + Optional autoDeleteSetting = default; Optional mode = default; Optional uri = default; Optional description = default; JobOutputType jobOutputType = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("assetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetName = null; + continue; + } + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetVersion = null; + continue; + } + assetVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,7 +166,7 @@ internal static MachineLearningFlowModelJobOutput DeserializeMachineLearningFlow continue; } } - return new MachineLearningFlowModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + return new MachineLearningFlowModelJobOutput(description.Value, jobOutputType, assetName.Value, assetVersion.Value, autoDeleteSetting.Value, Optional.ToNullable(mode), uri.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs index 3a3b0adc7e381..41c2c82578d21 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs @@ -21,15 +21,27 @@ public MachineLearningFlowModelJobOutput() /// Initializes a new instance of MachineLearningFlowModelJobOutput. /// Description for the output. /// [Required] Specifies the type of job. + /// Output Asset Name. + /// Output Asset Version. + /// Auto delete setting of output data asset. /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningFlowModelJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + internal MachineLearningFlowModelJobOutput(string description, JobOutputType jobOutputType, string assetName, string assetVersion, AutoDeleteSetting autoDeleteSetting, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) { + AssetName = assetName; + AssetVersion = assetVersion; + AutoDeleteSetting = autoDeleteSetting; Mode = mode; Uri = uri; JobOutputType = jobOutputType; } + /// Output Asset Name. + public string AssetName { get; set; } + /// Output Asset Version. + public string AssetVersion { get; set; } + /// Auto delete setting of output data asset. + public AutoDeleteSetting AutoDeleteSetting { get; set; } /// Output Asset Delivery Mode. public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs index 709c0b80d866b..ad427f3f901e1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs @@ -74,6 +74,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("featurizationSettings"); } } + if (Optional.IsDefined(FixedParameters)) + { + if (FixedParameters != null) + { + writer.WritePropertyName("fixedParameters"u8); + writer.WriteObjectValue(FixedParameters); + } + else + { + writer.WriteNull("fixedParameters"); + } + } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -98,6 +110,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("nCrossValidations"); } } + if (Optional.IsCollectionDefined(SearchSpace)) + { + if (SearchSpace != null) + { + writer.WritePropertyName("searchSpace"u8); + writer.WriteStartArray(); + foreach (var item in SearchSpace) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("searchSpace"); + } + } + if (Optional.IsDefined(SweepSettings)) + { + if (SweepSettings != null) + { + writer.WritePropertyName("sweepSettings"u8); + writer.WriteObjectValue(SweepSettings); + } + else + { + writer.WriteNull("sweepSettings"); + } + } if (Optional.IsDefined(TestData)) { if (TestData != null) @@ -193,8 +234,11 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting Optional trainingSettings = default; Optional> cvSplitColumnNames = default; Optional featurizationSettings = default; + Optional fixedParameters = default; Optional limitSettings = default; Optional nCrossValidations = default; + Optional> searchSpace = default; + Optional sweepSettings = default; Optional testData = default; Optional testDataSize = default; Optional validationData = default; @@ -260,6 +304,16 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value); continue; } + if (property.NameEquals("fixedParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fixedParameters = null; + continue; + } + fixedParameters = TableFixedParameters.DeserializeTableFixedParameters(property.Value); + continue; + } if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -280,6 +334,31 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value); continue; } + if (property.NameEquals("searchSpace"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchSpace = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TableParameterSubspace.DeserializeTableParameterSubspace(item)); + } + searchSpace = array; + continue; + } + if (property.NameEquals("sweepSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sweepSettings = null; + continue; + } + sweepSettings = TableSweepSettings.DeserializeTableSweepSettings(property.Value); + continue; + } if (property.NameEquals("testData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -360,7 +439,7 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting continue; } } - return new MachineLearningForecasting(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, forecastingSettings.Value, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, limitSettings.Value, nCrossValidations.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); + return new MachineLearningForecasting(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, forecastingSettings.Value, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, fixedParameters.Value, limitSettings.Value, nCrossValidations.Value, Optional.ToList(searchSpace), sweepSettings.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs index 5fb3414916e07..2391134d64665 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs @@ -22,6 +22,7 @@ public MachineLearningForecasting(MachineLearningTableJobInput trainingData) : b Argument.AssertNotNull(trainingData, nameof(trainingData)); CvSplitColumnNames = new ChangeTrackingList(); + SearchSpace = new ChangeTrackingList(); TaskType = TaskType.Forecasting; } @@ -38,6 +39,7 @@ public MachineLearningForecasting(MachineLearningTableJobInput trainingData) : b /// Inputs for training phase for an AutoML Job. /// Columns to use for CVSplit data. /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. /// /// Number of cross validation folds to be applied on training dataset @@ -45,6 +47,8 @@ public MachineLearningForecasting(MachineLearningTableJobInput trainingData) : b /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Test data input. /// /// The fraction of test dataset that needs to be set aside for validation purpose. @@ -58,15 +62,18 @@ public MachineLearningForecasting(MachineLearningTableJobInput trainingData) : b /// Applied when validation dataset is not provided. /// /// 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. - internal MachineLearningForecasting(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ForecastingSettings forecastingSettings, ForecastingPrimaryMetric? primaryMetric, ForecastingTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal MachineLearningForecasting(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ForecastingSettings forecastingSettings, ForecastingPrimaryMetric? primaryMetric, ForecastingTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableFixedParameters fixedParameters, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, IList searchSpace, TableSweepSettings sweepSettings, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) { ForecastingSettings = forecastingSettings; PrimaryMetric = primaryMetric; TrainingSettings = trainingSettings; CvSplitColumnNames = cvSplitColumnNames; FeaturizationSettings = featurizationSettings; + FixedParameters = fixedParameters; LimitSettings = limitSettings; NCrossValidations = nCrossValidations; + SearchSpace = searchSpace; + SweepSettings = sweepSettings; TestData = testData; TestDataSize = testDataSize; ValidationData = validationData; @@ -85,6 +92,8 @@ internal MachineLearningForecasting(MachineLearningLogVerbosity? logVerbosity, s public IList CvSplitColumnNames { get; set; } /// Featurization inputs needed for AutoML job. public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } + /// Model/training parameters that will remain constant throughout training. + public TableFixedParameters FixedParameters { get; set; } /// Execution constraints for AutoMLJob. public TableVerticalLimitSettings LimitSettings { get; set; } /// @@ -94,6 +103,10 @@ internal MachineLearningForecasting(MachineLearningLogVerbosity? logVerbosity, s /// The available derived classes include and . /// public NCrossValidations NCrossValidations { get; set; } + /// Search space for sampling different combinations of models and their hyperparameters. + public IList SearchSpace { get; set; } + /// Settings for model sweeping and hyperparameter tuning. + public TableSweepSettings SweepSettings { get; set; } /// Test data input. public MachineLearningTableJobInput TestData { get; set; } /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs index c673d36925602..91d3b62555756 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The MachineLearningFqdnEndpoints. + /// Property bag for FQDN endpoints result. public partial class MachineLearningFqdnEndpoints { /// Initializes a new instance of MachineLearningFqdnEndpoints. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobCollectionGetAllOptions.cs new file mode 100644 index 0000000000000..3f55c92c4dcb0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobCollectionGetAllOptions.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningJobCollectionGetAllOptions. + public partial class MachineLearningJobCollectionGetAllOptions + { + /// Initializes a new instance of MachineLearningJobCollectionGetAllOptions. + public MachineLearningJobCollectionGetAllOptions() + { + } + + /// Continuation token for pagination. + public string Skip { get; set; } + /// Type of job to be returned. + public string JobType { get; set; } + /// Jobs returned will have this tag key. + public string Tag { get; set; } + /// View type for including/excluding (for example) archived entities. + public MachineLearningListViewType? ListViewType { get; set; } + /// Asset name the job's named output is registered with. + public string AssetName { get; set; } + /// Indicator whether the job is scheduled job. + public bool? Scheduled { get; set; } + /// The scheduled id for listing the job triggered from. + public string ScheduleId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.Serialization.cs new file mode 100644 index 0000000000000..f21297992c965 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningJobPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.cs new file mode 100644 index 0000000000000..94342d10d0c93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobPatch.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Azure Resource Manager resource envelope strictly used in update requests. + public partial class MachineLearningJobPatch + { + /// Initializes a new instance of MachineLearningJobPatch. + public MachineLearningJobPatch() + { + } + + /// Additional attributes of the entity. + internal PartialJobBase Properties { get; set; } + /// + /// Send webhook callback to a service. Key is a user-provided name for the webhook. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public IDictionary NotificationSettingWebhooks + { + get => Properties is null ? default : Properties.NotificationSettingWebhooks; + set + { + if (Properties is null) + Properties = new PartialJobBase(); + Properties.NotificationSettingWebhooks = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs index d2ce2b47a2189..c6bf9abfb1eb3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs @@ -76,6 +76,36 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("jobType"u8); writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + if (Optional.IsCollectionDefined(SecretsConfiguration)) + { + if (SecretsConfiguration != null) + { + writer.WritePropertyName("secretsConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SecretsConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secretsConfiguration"); + } + } if (Optional.IsCollectionDefined(Services)) { if (Services != null) @@ -157,7 +187,9 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper { case "AutoML": return AutoMLJob.DeserializeAutoMLJob(element); case "Command": return MachineLearningCommandJob.DeserializeMachineLearningCommandJob(element); + case "Labeling": return LabelingJobProperties.DeserializeLabelingJobProperties(element); case "Pipeline": return MachineLearningPipelineJob.DeserializeMachineLearningPipelineJob(element); + case "Spark": return SparkJob.DeserializeSparkJob(element); case "Sweep": return MachineLearningSweepJob.DeserializeMachineLearningSweepJob(element); } } @@ -168,6 +200,8 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper Optional identity = default; Optional isArchived = default; JobType jobType = default; + Optional notificationSetting = default; + Optional> secretsConfiguration = default; Optional> services = default; Optional status = default; Optional description = default; @@ -234,6 +268,31 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper jobType = new JobType(property.Value.GetString()); continue; } + if (property.NameEquals("notificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notificationSetting = null; + continue; + } + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("secretsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secretsConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SecretConfiguration.DeserializeSecretConfiguration(property0.Value)); + } + secretsConfiguration = dictionary; + continue; + } if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -299,7 +358,7 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper continue; } } - return new MachineLearningJobProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status)); + return new MachineLearningJobProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, notificationSetting.Value, Optional.ToDictionary(secretsConfiguration), Optional.ToDictionary(services), Optional.ToNullable(status)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs index b6ba241ac9028..cf1f988450398 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs @@ -13,13 +13,14 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Base definition for a job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// public partial class MachineLearningJobProperties : MachineLearningResourceBase { /// Initializes a new instance of MachineLearningJobProperties. public MachineLearningJobProperties() { + SecretsConfiguration = new ChangeTrackingDictionary(); Services = new ChangeTrackingDictionary(); } @@ -39,12 +40,14 @@ public MachineLearningJobProperties() /// /// Is the asset archived?. /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. /// /// Status of the job. - internal MachineLearningJobProperties(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status) : base(description, properties, tags) + internal MachineLearningJobProperties(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary secretsConfiguration, IDictionary services, MachineLearningJobStatus? status) : base(description, properties, tags) { ComponentId = componentId; ComputeId = computeId; @@ -53,6 +56,8 @@ internal MachineLearningJobProperties(string description, IDictionary [Required] Specifies the type of job. internal JobType JobType { get; set; } + /// Notification setting for the job. + public NotificationSetting NotificationSetting { get; set; } + /// Configuration for secrets to be made available during runtime. + public IDictionary SecretsConfiguration { get; set; } /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs index 49897f105a488..d3a96fb568b00 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs @@ -51,6 +51,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("instanceType"); } } + if (Optional.IsCollectionDefined(Locations)) + { + if (Locations != null) + { + writer.WritePropertyName("locations"u8); + writer.WriteStartArray(); + foreach (var item in Locations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("locations"); + } + } + if (Optional.IsDefined(MaxInstanceCount)) + { + if (MaxInstanceCount != null) + { + writer.WritePropertyName("maxInstanceCount"u8); + writer.WriteNumberValue(MaxInstanceCount.Value); + } + else + { + writer.WriteNull("maxInstanceCount"); + } + } if (Optional.IsCollectionDefined(Properties)) { if (Properties != null) @@ -91,6 +120,8 @@ internal static MachineLearningJobResourceConfiguration DeserializeMachineLearni Optional shmSize = default; Optional instanceCount = default; Optional instanceType = default; + Optional> locations = default; + Optional maxInstanceCount = default; Optional> properties = default; foreach (var property in element.EnumerateObject()) { @@ -128,6 +159,31 @@ internal static MachineLearningJobResourceConfiguration DeserializeMachineLearni instanceType = property.Value.GetString(); continue; } + if (property.NameEquals("locations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + locations = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + locations = array; + continue; + } + if (property.NameEquals("maxInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxInstanceCount = null; + continue; + } + maxInstanceCount = property.Value.GetInt32(); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -151,7 +207,7 @@ internal static MachineLearningJobResourceConfiguration DeserializeMachineLearni continue; } } - return new MachineLearningJobResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties), dockerArgs.Value, shmSize.Value); + return new MachineLearningJobResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToList(locations), Optional.ToNullable(maxInstanceCount), Optional.ToDictionary(properties), dockerArgs.Value, shmSize.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs index c9dcfead3c98d..261a4fa7ea3d5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs @@ -21,10 +21,15 @@ public MachineLearningJobResourceConfiguration() /// Initializes a new instance of MachineLearningJobResourceConfiguration. /// Optional number of instances or nodes used by the compute target. /// Optional type of VM used as supported by the compute target. + /// Locations where the job can run. + /// + /// Optional max allowed number of instances or nodes to be used by the compute target. + /// For use with elastic training, currently supported by PyTorch distribution type only. + /// /// Additional properties bag. /// 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. /// 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). - internal MachineLearningJobResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties, string dockerArgs, string shmSize) : base(instanceCount, instanceType, properties) + internal MachineLearningJobResourceConfiguration(int? instanceCount, string instanceType, IList locations, int? maxInstanceCount, IDictionary properties, string dockerArgs, string shmSize) : base(instanceCount, instanceType, locations, maxInstanceCount, properties) { DockerArgs = dockerArgs; ShmSize = shmSize; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs index ea38b9d5eb7a5..9977df40ac384 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs @@ -17,7 +17,7 @@ public partial class MachineLearningJobScheduleAction : MachineLearningScheduleA /// /// [Required] Defines Schedule action definition details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// /// is null. public MachineLearningJobScheduleAction(MachineLearningJobProperties jobDefinition) @@ -33,7 +33,7 @@ public MachineLearningJobScheduleAction(MachineLearningJobProperties jobDefiniti /// /// [Required] Defines Schedule action definition details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// internal MachineLearningJobScheduleAction(ScheduleActionType actionType, MachineLearningJobProperties jobDefinition) : base(actionType) { @@ -44,7 +44,7 @@ internal MachineLearningJobScheduleAction(ScheduleActionType actionType, Machine /// /// [Required] Defines Schedule action definition details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// public MachineLearningJobProperties JobDefinition { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs index 07074e2116274..3bb5b53b1d2eb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs @@ -40,6 +40,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("jobServiceType"); } } + if (Optional.IsDefined(Nodes)) + { + if (Nodes != null) + { + writer.WritePropertyName("nodes"u8); + writer.WriteObjectValue(Nodes); + } + else + { + writer.WriteNull("nodes"); + } + } if (Optional.IsDefined(Port)) { if (Port != null) @@ -82,6 +94,7 @@ internal static MachineLearningJobService DeserializeMachineLearningJobService(J Optional endpoint = default; Optional errorMessage = default; Optional jobServiceType = default; + Optional nodes = default; Optional port = default; Optional> properties = default; Optional status = default; @@ -117,6 +130,16 @@ internal static MachineLearningJobService DeserializeMachineLearningJobService(J jobServiceType = property.Value.GetString(); continue; } + if (property.NameEquals("nodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nodes = null; + continue; + } + nodes = JobNodes.DeserializeJobNodes(property.Value); + continue; + } if (property.NameEquals("port"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -153,7 +176,7 @@ internal static MachineLearningJobService DeserializeMachineLearningJobService(J continue; } } - return new MachineLearningJobService(endpoint.Value, errorMessage.Value, jobServiceType.Value, Optional.ToNullable(port), Optional.ToDictionary(properties), status.Value); + return new MachineLearningJobService(endpoint.Value, errorMessage.Value, jobServiceType.Value, nodes.Value, Optional.ToNullable(port), Optional.ToDictionary(properties), status.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs index 5dc2a7d80c27e..fa9dc4af76e75 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs @@ -23,14 +23,21 @@ public MachineLearningJobService() /// Url for endpoint. /// Any error in the service. /// Endpoint type. - /// Port for endpoint. + /// + /// Nodes that user would like to start the service on. + /// If Nodes is not set or set to null, the service will only be started on leader node. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Port for endpoint set by user. /// Additional properties to set on the endpoint. /// Status of endpoint. - internal MachineLearningJobService(string endpoint, string errorMessage, string jobServiceType, int? port, IDictionary properties, string status) + internal MachineLearningJobService(string endpoint, string errorMessage, string jobServiceType, JobNodes nodes, int? port, IDictionary properties, string status) { Endpoint = endpoint; ErrorMessage = errorMessage; JobServiceType = jobServiceType; + Nodes = nodes; Port = port; Properties = properties; Status = status; @@ -42,7 +49,14 @@ internal MachineLearningJobService(string endpoint, string errorMessage, string public string ErrorMessage { get; } /// Endpoint type. public string JobServiceType { get; set; } - /// Port for endpoint. + /// + /// Nodes that user would like to start the service on. + /// If Nodes is not set or set to null, the service will only be started on leader node. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public JobNodes Nodes { get; set; } + /// Port for endpoint set by user. public int? Port { get; set; } /// Additional properties to set on the endpoint. public IDictionary Properties { get; set; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobStatus.cs index ec74f58e83451..7771e37733324 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobStatus.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobStatus.cs @@ -36,6 +36,7 @@ public MachineLearningJobStatus(string value) private const string NotRespondingValue = "NotResponding"; private const string PausedValue = "Paused"; private const string UnknownValue = "Unknown"; + private const string ScheduledValue = "Scheduled"; /// Run hasn't started yet. public static MachineLearningJobStatus NotStarted { get; } = new MachineLearningJobStatus(NotStartedValue); @@ -68,6 +69,8 @@ public MachineLearningJobStatus(string value) public static MachineLearningJobStatus Paused { get; } = new MachineLearningJobStatus(PausedValue); /// Default job status if not mapped to all other statuses. public static MachineLearningJobStatus Unknown { get; } = new MachineLearningJobStatus(UnknownValue); + /// The job is in a scheduled state. Job is not in any active state. + public static MachineLearningJobStatus Scheduled { get; } = new MachineLearningJobStatus(ScheduledValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningJobStatus left, MachineLearningJobStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs index 59306779e1dd8..3177fa0b143c5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs @@ -33,6 +33,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("appInsightsEnabled"u8); writer.WriteBooleanValue(AppInsightsEnabled.Value); } + if (Optional.IsDefined(DataCollector)) + { + if (DataCollector != null) + { + writer.WritePropertyName("dataCollector"u8); + writer.WriteObjectValue(DataCollector); + } + else + { + writer.WriteNull("dataCollector"); + } + } if (Optional.IsDefined(EgressPublicNetworkAccess)) { writer.WritePropertyName("egressPublicNetworkAccess"u8); @@ -207,6 +219,7 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear } Optional containerResourceRequirements = default; Optional appInsightsEnabled = default; + Optional dataCollector = default; Optional egressPublicNetworkAccess = default; MachineLearningEndpointComputeType endpointComputeType = default; Optional instanceType = default; @@ -243,6 +256,16 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear appInsightsEnabled = property.Value.GetBoolean(); continue; } + if (property.NameEquals("dataCollector"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataCollector = null; + continue; + } + dataCollector = DataCollector.DeserializeDataCollector(property.Value); + continue; + } if (property.NameEquals("egressPublicNetworkAccess"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -397,7 +420,7 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear continue; } } - return new MachineLearningKubernetesOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value, containerResourceRequirements.Value); + return new MachineLearningKubernetesOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), dataCollector.Value, Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value, containerResourceRequirements.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs index 83a817377d3ed..22bce712a51f9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs @@ -21,10 +21,11 @@ public MachineLearningKubernetesOnlineDeployment() /// Initializes a new instance of MachineLearningKubernetesOnlineDeployment. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. /// If true, enables Application Insights logging. + /// The mdc configuration, we disable mdc when it's null. /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// [Required] The compute type of the endpoint. /// Compute instance type. @@ -43,7 +44,7 @@ public MachineLearningKubernetesOnlineDeployment() /// The available derived classes include and . /// /// The resource requirements for the container (cpu and memory). - internal MachineLearningKubernetesOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings, MachineLearningContainerResourceRequirements containerResourceRequirements) : base(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) + internal MachineLearningKubernetesOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, DataCollector dataCollector, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings, MachineLearningContainerResourceRequirements containerResourceRequirements) : base(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) { ContainerResourceRequirements = containerResourceRequirements; EndpointComputeType = endpointComputeType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLabelingJobData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLabelingJobData.Serialization.cs new file mode 100644 index 0000000000000..5f1a6b1ecc7b5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLabelingJobData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningLabelingJobData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningLabelingJobData DeserializeMachineLearningLabelingJobData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + LabelingJobProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = LabelingJobProperties.DeserializeLabelingJobProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new MachineLearningLabelingJobData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs index d7a6e054346fe..4be7350285f3c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -27,20 +28,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(ExpiryOn)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Metadata)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif } - if (Optional.IsDefined(ValueFormat)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("valueFormat"u8); - writer.WriteStringValue(ValueFormat.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } writer.WriteEndObject(); } @@ -54,9 +59,9 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri Optional credentials = default; MachineLearningConnectionAuthType authType = default; Optional category = default; + Optional expiryTime = default; + Optional metadata = default; Optional target = default; - Optional value = default; - Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("credentials"u8)) @@ -82,27 +87,31 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri category = new MachineLearningConnectionCategory(property.Value.GetString()); continue; } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) + if (property.NameEquals("expiryTime"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("valueFormat"u8)) + if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); continue; } } - return new MachineLearningManagedIdentityAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + return new MachineLearningManagedIdentityAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs index c48526aa578cd..9afa5edb6d3e3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.MachineLearning.Models { /// The MachineLearningManagedIdentityAuthTypeWorkspaceConnection. @@ -19,11 +21,11 @@ public MachineLearningManagedIdentityAuthTypeWorkspaceConnection() /// Initializes a new instance of MachineLearningManagedIdentityAuthTypeWorkspaceConnection. /// Authentication type of the connection target. /// Category of the connection. + /// + /// Any object. /// - /// Value details of the workspace connection. - /// format for the workspace connection value. /// - internal MachineLearningManagedIdentityAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, MachineLearningWorkspaceConnectionManagedIdentity credentials) : base(authType, category, target, value, valueFormat) + internal MachineLearningManagedIdentityAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, MachineLearningWorkspaceConnectionManagedIdentity credentials) : base(authType, category, expiryOn, metadata, target) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs index 6f3561ef37f0d..959e776f2df00 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs @@ -21,6 +21,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("appInsightsEnabled"u8); writer.WriteBooleanValue(AppInsightsEnabled.Value); } + if (Optional.IsDefined(DataCollector)) + { + if (DataCollector != null) + { + writer.WritePropertyName("dataCollector"u8); + writer.WriteObjectValue(DataCollector); + } + else + { + writer.WriteNull("dataCollector"); + } + } if (Optional.IsDefined(EgressPublicNetworkAccess)) { writer.WritePropertyName("egressPublicNetworkAccess"u8); @@ -194,6 +206,7 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin return null; } Optional appInsightsEnabled = default; + Optional dataCollector = default; Optional egressPublicNetworkAccess = default; MachineLearningEndpointComputeType endpointComputeType = default; Optional instanceType = default; @@ -220,6 +233,16 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin appInsightsEnabled = property.Value.GetBoolean(); continue; } + if (property.NameEquals("dataCollector"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataCollector = null; + continue; + } + dataCollector = DataCollector.DeserializeDataCollector(property.Value); + continue; + } if (property.NameEquals("egressPublicNetworkAccess"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -374,7 +397,7 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin continue; } } - return new MachineLearningManagedOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); + return new MachineLearningManagedOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), dataCollector.Value, Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs index 7c1f9321f8396..d735190f5c873 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs @@ -21,10 +21,11 @@ public MachineLearningManagedOnlineDeployment() /// Initializes a new instance of MachineLearningManagedOnlineDeployment. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. /// If true, enables Application Insights logging. + /// The mdc configuration, we disable mdc when it's null. /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// [Required] The compute type of the endpoint. /// Compute instance type. @@ -42,7 +43,7 @@ public MachineLearningManagedOnlineDeployment() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal MachineLearningManagedOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) + internal MachineLearningManagedOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, DataCollector dataCollector, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) { EndpointComputeType = endpointComputeType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs index 9a9f5afda4c5e..5bc24973f3c5f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs @@ -78,6 +78,7 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni { return null; } + Optional provisioningState = default; Optional isArchived = default; Optional latestVersion = default; Optional nextVersion = default; @@ -86,6 +87,15 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni Optional> tags = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -156,7 +166,7 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni continue; } } - return new MachineLearningModelContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + return new MachineLearningModelContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs index b5a9ead74a699..626b3f4f1be20 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs @@ -24,8 +24,13 @@ public MachineLearningModelContainerProperties() /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. - internal MachineLearningModelContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + /// Provisioning state for the model container. + internal MachineLearningModelContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, isArchived, latestVersion, nextVersion) { + ProvisioningState = provisioningState; } + + /// Provisioning state for the model container. + public RegistryAssetProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionCollectionGetAllOptions.cs index 1310ba75efab6..8280198f26cc8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionCollectionGetAllOptions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionCollectionGetAllOptions.cs @@ -35,5 +35,7 @@ public MachineLearningModelVersionCollectionGetAllOptions() public string Feed { get; set; } /// View type for including/excluding (for example) archived entities. public MachineLearningListViewType? ListViewType { get; set; } + /// Model stage. + public string Stage { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs index 69d05dc63d29d..9cfc67e019382 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs @@ -35,6 +35,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("flavors"); } } + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } if (Optional.IsDefined(JobName)) { if (JobName != null) @@ -71,6 +83,30 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("modelUri"); } } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -139,9 +175,13 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning return null; } Optional> flavors = default; + Optional intellectualProperty = default; Optional jobName = default; Optional modelType = default; Optional modelUri = default; + Optional provisioningState = default; + Optional stage = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -164,6 +204,16 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning flavors = dictionary; continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } if (property.NameEquals("jobName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -194,6 +244,35 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning modelUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -253,7 +332,7 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning continue; } } - return new MachineLearningModelVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToDictionary(flavors), jobName.Value, modelType.Value, modelUri.Value); + return new MachineLearningModelVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToDictionary(flavors), intellectualProperty.Value, jobName.Value, modelType.Value, modelUri.Value, Optional.ToNullable(provisioningState), stage.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs index ab7fd2f270e8a..860f70203c483 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs @@ -24,27 +24,40 @@ public MachineLearningModelVersionProperties() /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// Mapping of model flavors to their properties. + /// Intellectual Property details. Used if model is an Intellectual Property. /// Name of the training job which produced this model. /// The storage format for this entity. Used for NCD. /// The URI path to the model contents. - internal MachineLearningModelVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, IDictionary flavors, string jobName, string modelType, Uri modelUri) : base(description, properties, tags, isAnonymous, isArchived) + /// Provisioning state for the model version. + /// Stage in the model lifecycle assigned to this model. + internal MachineLearningModelVersionProperties(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, IDictionary flavors, IntellectualProperty intellectualProperty, string jobName, string modelType, Uri modelUri, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived) { Flavors = flavors; + IntellectualProperty = intellectualProperty; JobName = jobName; ModelType = modelType; ModelUri = modelUri; + ProvisioningState = provisioningState; + Stage = stage; } /// Mapping of model flavors to their properties. public IDictionary Flavors { get; set; } + /// Intellectual Property details. Used if model is an Intellectual Property. + public IntellectualProperty IntellectualProperty { get; set; } /// Name of the training job which produced this model. public string JobName { get; set; } /// The storage format for this entity. Used for NCD. public string ModelType { get; set; } /// The URI path to the model contents. public Uri ModelUri { get; set; } + /// Provisioning state for the model version. + public RegistryAssetProvisioningState? ProvisioningState { get; } + /// Stage in the model lifecycle assigned to this model. + public string Stage { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs index c3da6a22b91d0..fc5a56e41d6f7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -22,20 +23,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(ExpiryOn)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Metadata)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif } - if (Optional.IsDefined(ValueFormat)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("valueFormat"u8); - writer.WriteStringValue(ValueFormat.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } writer.WriteEndObject(); } @@ -48,9 +53,9 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin } MachineLearningConnectionAuthType authType = default; Optional category = default; + Optional expiryTime = default; + Optional metadata = default; Optional target = default; - Optional value = default; - Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("authType"u8)) @@ -67,27 +72,31 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin category = new MachineLearningConnectionCategory(property.Value.GetString()); continue; } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) + if (property.NameEquals("expiryTime"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("valueFormat"u8)) + if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); continue; } } - return new MachineLearningNoneAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat)); + return new MachineLearningNoneAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs index d08054d689cc6..a9fdfea997898 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.MachineLearning.Models { /// The MachineLearningNoneAuthTypeWorkspaceConnection. @@ -19,10 +21,10 @@ public MachineLearningNoneAuthTypeWorkspaceConnection() /// Initializes a new instance of MachineLearningNoneAuthTypeWorkspaceConnection. /// Authentication type of the connection target. /// Category of the connection. + /// + /// Any object. /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - internal MachineLearningNoneAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat) : base(authType, category, target, value, valueFormat) + internal MachineLearningNoneAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target) : base(authType, category, expiryOn, metadata, target) { AuthType = authType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs index 9aeff56d5680f..0731c89794b24 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs @@ -19,8 +19,9 @@ internal static MachineLearningNotebookResourceInfo DeserializeMachineLearningNo return null; } Optional fqdn = default; - Optional resourceId = default; + Optional isPrivateLinkEnabled = default; Optional notebookPreparationError = default; + Optional resourceId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("fqdn"u8)) @@ -28,23 +29,31 @@ internal static MachineLearningNotebookResourceInfo DeserializeMachineLearningNo fqdn = property.Value.GetString(); continue; } - if (property.NameEquals("resourceId"u8)) + if (property.NameEquals("isPrivateLinkEnabled"u8)) { - resourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPrivateLinkEnabled = property.Value.GetBoolean(); continue; } if (property.NameEquals("notebookPreparationError"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notebookPreparationError = null; continue; } notebookPreparationError = MachineLearningNotebookPreparationError.DeserializeMachineLearningNotebookPreparationError(property.Value); continue; } + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } } - return new MachineLearningNotebookResourceInfo(fqdn.Value, resourceId.Value, notebookPreparationError.Value); + return new MachineLearningNotebookResourceInfo(fqdn.Value, Optional.ToNullable(isPrivateLinkEnabled), notebookPreparationError.Value, resourceId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs index 8143cef032a4c..572799304eaaf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs @@ -17,20 +17,24 @@ internal MachineLearningNotebookResourceInfo() /// Initializes a new instance of MachineLearningNotebookResourceInfo. /// - /// the data plane resourceId that used to initialize notebook component. + /// /// The error that occurs when preparing notebook. - internal MachineLearningNotebookResourceInfo(string fqdn, string resourceId, MachineLearningNotebookPreparationError notebookPreparationError) + /// the data plane resourceId that used to initialize notebook component. + internal MachineLearningNotebookResourceInfo(string fqdn, bool? isPrivateLinkEnabled, MachineLearningNotebookPreparationError notebookPreparationError, string resourceId) { Fqdn = fqdn; - ResourceId = resourceId; + IsPrivateLinkEnabled = isPrivateLinkEnabled; NotebookPreparationError = notebookPreparationError; + ResourceId = resourceId; } /// Gets the fqdn. public string Fqdn { get; } - /// the data plane resourceId that used to initialize notebook component. - public string ResourceId { get; } + /// Gets the is private link enabled. + public bool? IsPrivateLinkEnabled { get; } /// The error that occurs when preparing notebook. public MachineLearningNotebookPreparationError NotebookPreparationError { get; } + /// the data plane resourceId that used to initialize notebook component. + public string ResourceId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs index 51612fc900146..e1a343cecb2a4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs @@ -21,6 +21,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("appInsightsEnabled"u8); writer.WriteBooleanValue(AppInsightsEnabled.Value); } + if (Optional.IsDefined(DataCollector)) + { + if (DataCollector != null) + { + writer.WritePropertyName("dataCollector"u8); + writer.WriteObjectValue(DataCollector); + } + else + { + writer.WriteNull("dataCollector"); + } + } if (Optional.IsDefined(EgressPublicNetworkAccess)) { writer.WritePropertyName("egressPublicNetworkAccess"u8); @@ -202,6 +214,7 @@ internal static MachineLearningOnlineDeploymentProperties DeserializeMachineLear } } Optional appInsightsEnabled = default; + Optional dataCollector = default; Optional egressPublicNetworkAccess = default; MachineLearningEndpointComputeType endpointComputeType = default; Optional instanceType = default; @@ -228,6 +241,16 @@ internal static MachineLearningOnlineDeploymentProperties DeserializeMachineLear appInsightsEnabled = property.Value.GetBoolean(); continue; } + if (property.NameEquals("dataCollector"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataCollector = null; + continue; + } + dataCollector = DataCollector.DeserializeDataCollector(property.Value); + continue; + } if (property.NameEquals("egressPublicNetworkAccess"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -382,7 +405,7 @@ internal static MachineLearningOnlineDeploymentProperties DeserializeMachineLear continue; } } - return new MachineLearningOnlineDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); + return new MachineLearningOnlineDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), dataCollector.Value, Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs index edc878b62b9ca..d0ab8c543e673 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs @@ -24,10 +24,11 @@ public MachineLearningOnlineDeploymentProperties() /// Initializes a new instance of MachineLearningOnlineDeploymentProperties. /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// ARM resource ID of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. /// Property dictionary. Properties can be added, but not removed or altered. /// If true, enables Application Insights logging. + /// The mdc configuration, we disable mdc when it's null. /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// [Required] The compute type of the endpoint. /// Compute instance type. @@ -45,9 +46,10 @@ public MachineLearningOnlineDeploymentProperties() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties) + internal MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, DataCollector dataCollector, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties) { AppInsightsEnabled = appInsightsEnabled; + DataCollector = dataCollector; EgressPublicNetworkAccess = egressPublicNetworkAccess; EndpointComputeType = endpointComputeType; InstanceType = instanceType; @@ -62,6 +64,8 @@ internal MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfigurat /// If true, enables Application Insights logging. public bool? AppInsightsEnabled { get; set; } + /// The mdc configuration, we disable mdc when it's null. + public DataCollector DataCollector { get; set; } /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. public MachineLearningEgressPublicNetworkAccessType? EgressPublicNetworkAccess { get; set; } /// [Required] The compute type of the endpoint. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs index 044cd52cb1c0d..2dae5704ba38c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs @@ -29,6 +29,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("compute"); } } + if (Optional.IsCollectionDefined(MirrorTraffic)) + { + if (MirrorTraffic != null) + { + writer.WritePropertyName("mirrorTraffic"u8); + writer.WriteStartObject(); + foreach (var item in MirrorTraffic) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("mirrorTraffic"); + } + } if (Optional.IsDefined(PublicNetworkAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); @@ -106,6 +124,7 @@ internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearni return null; } Optional compute = default; + Optional> mirrorTraffic = default; Optional provisioningState = default; Optional publicNetworkAccess = default; Optional> traffic = default; @@ -127,6 +146,21 @@ internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearni compute = property.Value.GetString(); continue; } + if (property.NameEquals("mirrorTraffic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + mirrorTraffic = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetInt32()); + } + mirrorTraffic = dictionary; + continue; + } if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -221,7 +255,7 @@ internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearni continue; } } - return new MachineLearningOnlineEndpointProperties(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value, compute.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(publicNetworkAccess), Optional.ToDictionary(traffic)); + return new MachineLearningOnlineEndpointProperties(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value, compute.Value, Optional.ToDictionary(mirrorTraffic), Optional.ToNullable(provisioningState), Optional.ToNullable(publicNetworkAccess), Optional.ToDictionary(traffic)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs index ffba97e79f50f..569984a80033b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs @@ -18,6 +18,7 @@ public partial class MachineLearningOnlineEndpointProperties : MachineLearningEn /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. public MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode) : base(authMode) { + MirrorTraffic = new ChangeTrackingDictionary(); Traffic = new ChangeTrackingDictionary(); } @@ -35,12 +36,14 @@ public MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode a /// ARM resource ID of the compute if it exists. /// optional /// + /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. /// Provisioning state for the endpoint. /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. - internal MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, string compute, MachineLearningEndpointProvisioningState? provisioningState, MachineLearningPublicNetworkAccessType? publicNetworkAccess, IDictionary traffic) : base(authMode, description, keys, properties, scoringUri, swaggerUri) + internal MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, string compute, IDictionary mirrorTraffic, MachineLearningEndpointProvisioningState? provisioningState, MachineLearningPublicNetworkAccessType? publicNetworkAccess, IDictionary traffic) : base(authMode, description, keys, properties, scoringUri, swaggerUri) { Compute = compute; + MirrorTraffic = mirrorTraffic; ProvisioningState = provisioningState; PublicNetworkAccess = publicNetworkAccess; Traffic = traffic; @@ -51,6 +54,8 @@ internal MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode /// optional /// public string Compute { get; set; } + /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. + public IDictionary MirrorTraffic { get; set; } /// Provisioning state for the endpoint. public MachineLearningEndpointProvisioningState? ProvisioningState { get; } /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs new file mode 100644 index 0000000000000..be73a5e607fb0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningOutboundRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(OutboundRuleType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningOutboundRule DeserializeMachineLearningOutboundRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FQDN": return FqdnOutboundRule.DeserializeFqdnOutboundRule(element); + case "PrivateEndpoint": return PrivateEndpointOutboundRule.DeserializePrivateEndpointOutboundRule(element); + case "ServiceTag": return ServiceTagOutboundRule.DeserializeServiceTagOutboundRule(element); + } + } + return UnknownOutboundRule.DeserializeUnknownOutboundRule(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs new file mode 100644 index 0000000000000..f403652ba6491 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Outbound Rule for the managed network of a machine learning workspace. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class MachineLearningOutboundRule + { + /// Initializes a new instance of MachineLearningOutboundRule. + protected MachineLearningOutboundRule() + { + } + + /// Initializes a new instance of MachineLearningOutboundRule. + /// Category of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + internal MachineLearningOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType) + { + Category = category; + Status = status; + OutboundRuleType = outboundRuleType; + } + + /// Category of a managed network Outbound Rule of a machine learning workspace. + public OutboundRuleCategory? Category { get; set; } + /// Type of a managed network Outbound Rule of a machine learning workspace. + public OutboundRuleStatus? Status { get; set; } + /// Type of a managed network Outbound Rule of a machine learning workspace. + internal OutboundRuleType OutboundRuleType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRuleBasicData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRuleBasicData.Serialization.cs new file mode 100644 index 0000000000000..0bae35d4d256b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRuleBasicData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningOutboundRuleBasicData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningOutboundRuleBasicData DeserializeMachineLearningOutboundRuleBasicData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MachineLearningOutboundRule properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = MachineLearningOutboundRule.DeserializeMachineLearningOutboundRule(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new MachineLearningOutboundRuleBasicData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputDeliveryMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputDeliveryMode.cs index 22607b35e028a..7aa4c99a6e2ab 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputDeliveryMode.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputDeliveryMode.cs @@ -24,11 +24,14 @@ public MachineLearningOutputDeliveryMode(string value) private const string ReadWriteMountValue = "ReadWriteMount"; private const string UploadValue = "Upload"; + private const string DirectValue = "Direct"; /// ReadWriteMount. public static MachineLearningOutputDeliveryMode ReadWriteMount { get; } = new MachineLearningOutputDeliveryMode(ReadWriteMountValue); /// Upload. public static MachineLearningOutputDeliveryMode Upload { get; } = new MachineLearningOutputDeliveryMode(UploadValue); + /// Direct. + public static MachineLearningOutputDeliveryMode Direct { get; } = new MachineLearningOutputDeliveryMode(DirectValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningOutputDeliveryMode left, MachineLearningOutputDeliveryMode right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs index 957fcbde25ddb..f45ecbc28d1b5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -27,20 +28,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(ExpiryOn)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Metadata)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif } - if (Optional.IsDefined(ValueFormat)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("valueFormat"u8); - writer.WriteStringValue(ValueFormat.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } writer.WriteEndObject(); } @@ -54,9 +59,9 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine Optional credentials = default; MachineLearningConnectionAuthType authType = default; Optional category = default; + Optional expiryTime = default; + Optional metadata = default; Optional target = default; - Optional value = default; - Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("credentials"u8)) @@ -82,27 +87,31 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine category = new MachineLearningConnectionCategory(property.Value.GetString()); continue; } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) + if (property.NameEquals("expiryTime"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("valueFormat"u8)) + if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); continue; } } - return new MachineLearningPatAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + return new MachineLearningPatAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs index 8cf685a23f3bb..d2f4024f1a258 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.MachineLearning.Models { /// The MachineLearningPatAuthTypeWorkspaceConnection. @@ -19,11 +21,11 @@ public MachineLearningPatAuthTypeWorkspaceConnection() /// Initializes a new instance of MachineLearningPatAuthTypeWorkspaceConnection. /// Authentication type of the connection target. /// Category of the connection. + /// + /// Any object. /// - /// Value details of the workspace connection. - /// format for the workspace connection value. /// - internal MachineLearningPatAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, WorkspaceConnectionPersonalAccessToken credentials) : base(authType, category, target, value, valueFormat) + internal MachineLearningPatAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, WorkspaceConnectionPersonalAccessToken credentials) : base(authType, category, expiryOn, metadata, target) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs index 7a1ad994abd8e..ed834069581bb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs @@ -168,6 +168,36 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("jobType"u8); writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + if (Optional.IsCollectionDefined(SecretsConfiguration)) + { + if (SecretsConfiguration != null) + { + writer.WritePropertyName("secretsConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SecretsConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secretsConfiguration"); + } + } if (Optional.IsCollectionDefined(Services)) { if (Services != null) @@ -255,6 +285,8 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob Optional identity = default; Optional isArchived = default; JobType jobType = default; + Optional notificationSetting = default; + Optional> secretsConfiguration = default; Optional> services = default; Optional status = default; Optional description = default; @@ -393,6 +425,31 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob jobType = new JobType(property.Value.GetString()); continue; } + if (property.NameEquals("notificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notificationSetting = null; + continue; + } + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("secretsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secretsConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SecretConfiguration.DeserializeSecretConfiguration(property0.Value)); + } + secretsConfiguration = dictionary; + continue; + } if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -458,7 +515,7 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob continue; } } - return new MachineLearningPipelineJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), Optional.ToDictionary(inputs), Optional.ToDictionary(jobs), Optional.ToDictionary(outputs), settings.Value, sourceJobId.Value); + return new MachineLearningPipelineJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, notificationSetting.Value, Optional.ToDictionary(secretsConfiguration), Optional.ToDictionary(services), Optional.ToNullable(status), Optional.ToDictionary(inputs), Optional.ToDictionary(jobs), Optional.ToDictionary(outputs), settings.Value, sourceJobId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs index 78878b10339cc..cafb509ee14cc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs @@ -39,6 +39,8 @@ public MachineLearningPipelineJob() /// /// Is the asset archived?. /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. @@ -57,7 +59,7 @@ public MachineLearningPipelineJob() /// /// Pipeline settings, for things like ContinueRunOnStepFailure etc. /// ARM resource ID of source job. - internal MachineLearningPipelineJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, IDictionary inputs, IDictionary jobs, IDictionary outputs, BinaryData settings, ResourceIdentifier sourceJobId) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + internal MachineLearningPipelineJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary secretsConfiguration, IDictionary services, MachineLearningJobStatus? status, IDictionary inputs, IDictionary jobs, IDictionary outputs, BinaryData settings, ResourceIdentifier sourceJobId) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, secretsConfiguration, services, status) { Inputs = inputs; Jobs = jobs; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs index 99a475bd9b41c..9325b6990d7ef 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs @@ -18,17 +18,17 @@ public MachineLearningPrivateEndpoint() } /// Initializes a new instance of MachineLearningPrivateEndpoint. - /// The ARM identifier for Private Endpoint. - /// The ARM identifier for Subnet resource that private endpoint links to. + /// e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}. + /// The subnetId that the private endpoint is connected to. internal MachineLearningPrivateEndpoint(ResourceIdentifier id, ResourceIdentifier subnetArmId) { Id = id; SubnetArmId = subnetArmId; } - /// The ARM identifier for Private Endpoint. + /// e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}. public ResourceIdentifier Id { get; } - /// The ARM identifier for Subnet resource that private endpoint links to. + /// The subnetId that the private endpoint is connected to. public ResourceIdentifier SubnetArmId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs index cef5a601f5415..bbbc56ecaabce 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The private endpoint connection status. + /// Connection status of the service consumer with the service provider. public readonly partial struct MachineLearningPrivateEndpointServiceConnectionStatus : IEquatable { private readonly string _value; @@ -22,16 +22,16 @@ public MachineLearningPrivateEndpointServiceConnectionStatus(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string PendingValue = "Pending"; private const string ApprovedValue = "Approved"; + private const string PendingValue = "Pending"; private const string RejectedValue = "Rejected"; private const string DisconnectedValue = "Disconnected"; private const string TimeoutValue = "Timeout"; - /// Pending. - public static MachineLearningPrivateEndpointServiceConnectionStatus Pending { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(PendingValue); /// Approved. public static MachineLearningPrivateEndpointServiceConnectionStatus Approved { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(ApprovedValue); + /// Pending. + public static MachineLearningPrivateEndpointServiceConnectionStatus Pending { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(PendingValue); /// Rejected. public static MachineLearningPrivateEndpointServiceConnectionStatus Rejected { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(RejectedValue); /// Disconnected. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs index 244ca6e2ff074..1302619d7a7c2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs @@ -29,8 +29,8 @@ public MachineLearningPrivateLinkResource(AzureLocation location) : base(locatio /// The systemData. /// The tags. /// The location. - /// The identity of the resource. - /// The sku of the workspace. + /// Managed service identity (system assigned and/or user assigned identities). + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. /// The private link resource group id. /// The private link resource required member names. /// The private link resource Private link DNS zone name. @@ -43,9 +43,9 @@ internal MachineLearningPrivateLinkResource(ResourceIdentifier id, string name, RequiredZoneNames = requiredZoneNames; } - /// The identity of the resource. + /// Managed service identity (system assigned and/or user assigned identities). public ManagedServiceIdentity Identity { get; set; } - /// The sku of the workspace. + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. public MachineLearningSku Sku { get; set; } /// The private link resource group id. public string GroupId { get; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs index 92d821de5a906..3d20337e1e1bc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs @@ -20,13 +20,13 @@ internal MachineLearningPrivateLinkResourceListResult() } /// Initializes a new instance of MachineLearningPrivateLinkResourceListResult. - /// Array of private link resources. + /// internal MachineLearningPrivateLinkResourceListResult(IReadOnlyList value) { Value = value; } - /// Array of private link resources. + /// Gets the value. public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs index f601f69175aad..ec4b3c3f72cdc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs @@ -15,20 +15,20 @@ public partial class MachineLearningPrivateLinkServiceConnectionState : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Status)) + if (Optional.IsDefined(ActionsRequired)) { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); + writer.WritePropertyName("actionsRequired"u8); + writer.WriteStringValue(ActionsRequired); } if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - if (Optional.IsDefined(ActionsRequired)) + if (Optional.IsDefined(Status)) { - writer.WritePropertyName("actionsRequired"u8); - writer.WriteStringValue(ActionsRequired); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); } writer.WriteEndObject(); } @@ -39,18 +39,14 @@ internal static MachineLearningPrivateLinkServiceConnectionState DeserializeMach { return null; } - Optional status = default; - Optional description = default; Optional actionsRequired = default; + Optional description = default; + Optional status = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("status"u8)) + if (property.NameEquals("actionsRequired"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new MachineLearningPrivateEndpointServiceConnectionStatus(property.Value.GetString()); + actionsRequired = property.Value.GetString(); continue; } if (property.NameEquals("description"u8)) @@ -58,13 +54,17 @@ internal static MachineLearningPrivateLinkServiceConnectionState DeserializeMach description = property.Value.GetString(); continue; } - if (property.NameEquals("actionsRequired"u8)) + if (property.NameEquals("status"u8)) { - actionsRequired = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new MachineLearningPrivateEndpointServiceConnectionStatus(property.Value.GetString()); continue; } } - return new MachineLearningPrivateLinkServiceConnectionState(Optional.ToNullable(status), description.Value, actionsRequired.Value); + return new MachineLearningPrivateLinkServiceConnectionState(actionsRequired.Value, description.Value, Optional.ToNullable(status)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs index 9d1c6a219c0f8..1dde6942dac89 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs @@ -16,21 +16,21 @@ public MachineLearningPrivateLinkServiceConnectionState() } /// Initializes a new instance of MachineLearningPrivateLinkServiceConnectionState. - /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - /// The reason for approval/rejection of the connection. - /// A message indicating if changes on the service provider require any updates on the consumer. - internal MachineLearningPrivateLinkServiceConnectionState(MachineLearningPrivateEndpointServiceConnectionStatus? status, string description, string actionsRequired) + /// Some RP chose "None". Other RPs use this for region expansion. + /// User-defined message that, per NRP doc, may be used for approval-related message. + /// Connection status of the service consumer with the service provider. + internal MachineLearningPrivateLinkServiceConnectionState(string actionsRequired, string description, MachineLearningPrivateEndpointServiceConnectionStatus? status) { - Status = status; - Description = description; ActionsRequired = actionsRequired; + Description = description; + Status = status; } - /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } - /// The reason for approval/rejection of the connection. - public string Description { get; set; } - /// A message indicating if changes on the service provider require any updates on the consumer. + /// Some RP chose "None". Other RPs use this for region expansion. public string ActionsRequired { get; set; } + /// User-defined message that, per NRP doc, may be used for approval-related message. + public string Description { get; set; } + /// Connection status of the service consumer with the service provider. + public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs index eb8b4f0438bbd..811fe941e0165 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// 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 readonly partial struct MachineLearningProvisioningState : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryData.Serialization.cs new file mode 100644 index 0000000000000..3f2a87810a1a9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryData.Serialization.cs @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningRegistryData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DiscoveryUri)) + { + if (DiscoveryUri != null) + { + writer.WritePropertyName("discoveryUrl"u8); + writer.WriteStringValue(DiscoveryUri.AbsoluteUri); + } + else + { + writer.WriteNull("discoveryUrl"); + } + } + if (Optional.IsDefined(IntellectualPropertyPublisher)) + { + if (IntellectualPropertyPublisher != null) + { + writer.WritePropertyName("intellectualPropertyPublisher"u8); + writer.WriteStringValue(IntellectualPropertyPublisher); + } + else + { + writer.WriteNull("intellectualPropertyPublisher"); + } + } + if (Optional.IsDefined(ManagedResourceGroup)) + { + if (ManagedResourceGroup != null) + { + writer.WritePropertyName("managedResourceGroup"u8); + writer.WriteObjectValue(ManagedResourceGroup); + } + else + { + writer.WriteNull("managedResourceGroup"); + } + } + if (Optional.IsDefined(MlFlowRegistryUri)) + { + if (MlFlowRegistryUri != null) + { + writer.WritePropertyName("mlFlowRegistryUri"u8); + writer.WriteStringValue(MlFlowRegistryUri.AbsoluteUri); + } + else + { + writer.WriteNull("mlFlowRegistryUri"); + } + } + if (Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + if (PrivateEndpointConnections != null) + { + writer.WritePropertyName("privateEndpointConnections"u8); + writer.WriteStartArray(); + foreach (var item in PrivateEndpointConnections) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("privateEndpointConnections"); + } + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + if (PublicNetworkAccess != null) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } + else + { + writer.WriteNull("publicNetworkAccess"); + } + } + if (Optional.IsCollectionDefined(RegionDetails)) + { + if (RegionDetails != null) + { + writer.WritePropertyName("regionDetails"u8); + writer.WriteStartArray(); + foreach (var item in RegionDetails) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("regionDetails"); + } + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static MachineLearningRegistryData DeserializeMachineLearningRegistryData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional identity = default; + Optional kind = default; + Optional sku = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional discoveryUrl = default; + Optional intellectualPropertyPublisher = default; + Optional managedResourceGroup = default; + Optional mlFlowRegistryUri = default; + Optional> privateEndpointConnections = default; + Optional publicNetworkAccess = default; + Optional> regionDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("discoveryUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + discoveryUrl = null; + continue; + } + discoveryUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("intellectualPropertyPublisher"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + intellectualPropertyPublisher = null; + continue; + } + intellectualPropertyPublisher = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("managedResourceGroup"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + managedResourceGroup = null; + continue; + } + managedResourceGroup = ArmResourceId.DeserializeArmResourceId(property0.Value); + continue; + } + if (property0.NameEquals("mlFlowRegistryUri"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + mlFlowRegistryUri = null; + continue; + } + mlFlowRegistryUri = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("privateEndpointConnections"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + privateEndpointConnections = null; + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(RegistryPrivateEndpointConnection.DeserializeRegistryPrivateEndpointConnection(item)); + } + privateEndpointConnections = array; + continue; + } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + publicNetworkAccess = null; + continue; + } + publicNetworkAccess = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("regionDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + regionDetails = null; + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(RegistryRegionArmDetails.DeserializeRegistryRegionArmDetails(item)); + } + regionDetails = array; + continue; + } + } + continue; + } + } + return new MachineLearningRegistryData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, sku.Value, discoveryUrl.Value, intellectualPropertyPublisher.Value, managedResourceGroup.Value, mlFlowRegistryUri.Value, Optional.ToList(privateEndpointConnections), publicNetworkAccess.Value, Optional.ToList(regionDetails)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryModelVersionCollectionGetAllOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryModelVersionCollectionGetAllOptions.cs new file mode 100644 index 0000000000000..593db2b06243d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryModelVersionCollectionGetAllOptions.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MachineLearningRegistryModelVersionCollectionGetAllOptions. + public partial class MachineLearningRegistryModelVersionCollectionGetAllOptions + { + /// Initializes a new instance of MachineLearningRegistryModelVersionCollectionGetAllOptions. + public MachineLearningRegistryModelVersionCollectionGetAllOptions() + { + } + + /// Continuation token for pagination. + public string Skip { get; set; } + /// Ordering of list. + public string OrderBy { get; set; } + /// Maximum number of records to return. + public int? Top { get; set; } + /// Version identifier. + public string Version { get; set; } + /// Model description. + public string Description { get; set; } + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + public string Tags { get; set; } + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + public string Properties { get; set; } + /// View type for including/excluding (for example) archived entities. + public MachineLearningListViewType? ListViewType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.Serialization.cs new file mode 100644 index 0000000000000..d36ee908ff7d5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.Serialization.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningRegistryPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.cs new file mode 100644 index 0000000000000..4b4d9c5350154 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRegistryPatch.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Strictly used in update requests. + public partial class MachineLearningRegistryPatch + { + /// Initializes a new instance of MachineLearningRegistryPatch. + public MachineLearningRegistryPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } + /// Sku details required for ARM contract for Autoscaling. + public MachineLearningSkuPatch Sku { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.Serialization.cs index 55e8308354690..6fe972312605d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.Serialization.cs @@ -34,6 +34,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("instanceType"); } } + if (Optional.IsCollectionDefined(Locations)) + { + if (Locations != null) + { + writer.WritePropertyName("locations"u8); + writer.WriteStartArray(); + foreach (var item in Locations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("locations"); + } + } + if (Optional.IsDefined(MaxInstanceCount)) + { + if (MaxInstanceCount != null) + { + writer.WritePropertyName("maxInstanceCount"u8); + writer.WriteNumberValue(MaxInstanceCount.Value); + } + else + { + writer.WriteNull("maxInstanceCount"); + } + } if (Optional.IsCollectionDefined(Properties)) { if (Properties != null) @@ -72,6 +101,8 @@ internal static MachineLearningResourceConfiguration DeserializeMachineLearningR } Optional instanceCount = default; Optional instanceType = default; + Optional> locations = default; + Optional maxInstanceCount = default; Optional> properties = default; foreach (var property in element.EnumerateObject()) { @@ -94,6 +125,31 @@ internal static MachineLearningResourceConfiguration DeserializeMachineLearningR instanceType = property.Value.GetString(); continue; } + if (property.NameEquals("locations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + locations = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + locations = array; + continue; + } + if (property.NameEquals("maxInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxInstanceCount = null; + continue; + } + maxInstanceCount = property.Value.GetInt32(); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -117,7 +173,7 @@ internal static MachineLearningResourceConfiguration DeserializeMachineLearningR continue; } } - return new MachineLearningResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties)); + return new MachineLearningResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToList(locations), Optional.ToNullable(maxInstanceCount), Optional.ToDictionary(properties)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.cs index 7c932254c727f..e2727df298e14 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.cs @@ -17,17 +17,25 @@ public partial class MachineLearningResourceConfiguration /// Initializes a new instance of MachineLearningResourceConfiguration. public MachineLearningResourceConfiguration() { + Locations = new ChangeTrackingList(); Properties = new ChangeTrackingDictionary(); } /// Initializes a new instance of MachineLearningResourceConfiguration. /// Optional number of instances or nodes used by the compute target. /// Optional type of VM used as supported by the compute target. + /// Locations where the job can run. + /// + /// Optional max allowed number of instances or nodes to be used by the compute target. + /// For use with elastic training, currently supported by PyTorch distribution type only. + /// /// Additional properties bag. - internal MachineLearningResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties) + internal MachineLearningResourceConfiguration(int? instanceCount, string instanceType, IList locations, int? maxInstanceCount, IDictionary properties) { InstanceCount = instanceCount; InstanceType = instanceType; + Locations = locations; + MaxInstanceCount = maxInstanceCount; Properties = properties; } @@ -35,6 +43,13 @@ internal MachineLearningResourceConfiguration(int? instanceCount, string instanc public int? InstanceCount { get; set; } /// Optional type of VM used as supported by the compute target. public string InstanceType { get; set; } + /// Locations where the job can run. + public IList Locations { get; set; } + /// + /// Optional max allowed number of instances or nodes to be used by the compute target. + /// For use with elastic training, currently supported by PyTorch distribution type only. + /// + public int? MaxInstanceCount { get; set; } /// /// Additional properties bag. /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs index eb446189002f1..21e130638a7c2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -27,20 +28,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(ExpiryOn)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Metadata)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif } - if (Optional.IsDefined(ValueFormat)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("valueFormat"u8); - writer.WriteStringValue(ValueFormat.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } writer.WriteEndObject(); } @@ -54,9 +59,9 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine Optional credentials = default; MachineLearningConnectionAuthType authType = default; Optional category = default; + Optional expiryTime = default; + Optional metadata = default; Optional target = default; - Optional value = default; - Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("credentials"u8)) @@ -82,27 +87,31 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine category = new MachineLearningConnectionCategory(property.Value.GetString()); continue; } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) + if (property.NameEquals("expiryTime"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("valueFormat"u8)) + if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); continue; } } - return new MachineLearningSasAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + return new MachineLearningSasAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs index 4ed319c4e4c55..74b5195a37bda 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.MachineLearning.Models { /// The MachineLearningSasAuthTypeWorkspaceConnection. @@ -19,11 +21,11 @@ public MachineLearningSasAuthTypeWorkspaceConnection() /// Initializes a new instance of MachineLearningSasAuthTypeWorkspaceConnection. /// Authentication type of the connection target. /// Category of the connection. + /// + /// Any object. /// - /// Value details of the workspace connection. - /// format for the workspace connection value. /// - internal MachineLearningSasAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, WorkspaceConnectionSharedAccessSignature credentials) : base(authType, category, target, value, valueFormat) + internal MachineLearningSasAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, WorkspaceConnectionSharedAccessSignature credentials) : base(authType, category, expiryOn, metadata, target) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.Serialization.cs index 3b1df27faed95..ec12bb25a92f4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.Serialization.cs @@ -31,6 +31,8 @@ internal static MachineLearningScheduleAction DeserializeMachineLearningSchedule switch (discriminator.GetString()) { case "CreateJob": return MachineLearningJobScheduleAction.DeserializeMachineLearningJobScheduleAction(element); + case "CreateMonitor": return CreateMonitorAction.DeserializeCreateMonitorAction(element); + case "ImportData": return ImportDataAction.DeserializeImportDataAction(element); case "InvokeBatchEndpoint": return MachineLearningEndpointScheduleAction.DeserializeMachineLearningEndpointScheduleAction(element); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.cs index d2c9588f841fd..559685ff54b89 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// The MachineLearningScheduleAction. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , , and . /// public abstract partial class MachineLearningScheduleAction { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.Serialization.cs index ab5736eb78631..0dc708e8c586b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.Serialization.cs @@ -10,8 +10,36 @@ namespace Azure.ResourceManager.MachineLearning.Models { - public partial class MachineLearningScheduleBase + public partial class MachineLearningScheduleBase : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + if (Id != null) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + else + { + writer.WriteNull("id"); + } + } + if (Optional.IsDefined(ProvisioningStatus)) + { + writer.WritePropertyName("provisioningStatus"u8); + writer.WriteStringValue(ProvisioningStatus.Value.ToString()); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WriteEndObject(); + } + internal static MachineLearningScheduleBase DeserializeMachineLearningScheduleBase(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.cs index 1a325d01907b1..c252dda1ec53f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningScheduleBase { /// Initializes a new instance of MachineLearningScheduleBase. - internal MachineLearningScheduleBase() + public MachineLearningScheduleBase() { } @@ -27,10 +27,10 @@ internal MachineLearningScheduleBase(string id, MachineLearningScheduleProvision } /// A system assigned id for the schedule. - public string Id { get; } + public string Id { get; set; } /// The current deployment state of schedule. - public MachineLearningScheduleProvisioningState? ProvisioningStatus { get; } + public MachineLearningScheduleProvisioningState? ProvisioningStatus { get; set; } /// Is the schedule enabled or disabled?. - public MachineLearningScheduleStatus? Status { get; } + public MachineLearningScheduleStatus? Status { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs index 84357d3c17e5c..4e1308af3bfb6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs @@ -18,7 +18,7 @@ public partial class MachineLearningScheduleProperties : MachineLearningResource /// /// [Required] Specifies the action of the schedule /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , , and . /// /// /// [Required] Specifies the trigger details @@ -42,7 +42,7 @@ public MachineLearningScheduleProperties(MachineLearningScheduleAction action, M /// /// [Required] Specifies the action of the schedule /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , , and . /// /// Display name of schedule. /// Is the schedule enabled?. @@ -64,7 +64,7 @@ internal MachineLearningScheduleProperties(string description, IDictionary /// [Required] Specifies the action of the schedule /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , , and . /// public MachineLearningScheduleAction Action { get; set; } /// Display name of schedule. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs index a5aa3091b0a17..76beeae265cf9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs @@ -16,7 +16,7 @@ public MachineLearningScriptReference() } /// Initializes a new instance of MachineLearningScriptReference. - /// The storage source of the script: workspace. + /// The storage source of the script: inline, workspace. /// The location of scripts in the mounted volume. /// Optional command line arguments passed to the script to run. /// Optional time period passed to timeout command. @@ -28,7 +28,7 @@ internal MachineLearningScriptReference(string scriptSource, string scriptData, Timeout = timeout; } - /// The storage source of the script: workspace. + /// The storage source of the script: inline, workspace. public string ScriptSource { get; set; } /// The location of scripts in the mounted volume. public string ScriptData { get; set; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs index 3fb2c44b91990..d8a76f2802783 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs @@ -22,16 +22,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(PrivateLinkResourceId)) - { - writer.WritePropertyName("privateLinkResourceId"u8); - writer.WriteStringValue(PrivateLinkResourceId); - } if (Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); writer.WriteStringValue(GroupId); } + if (Optional.IsDefined(PrivateLinkResourceId)) + { + writer.WritePropertyName("privateLinkResourceId"u8); + writer.WriteStringValue(PrivateLinkResourceId); + } if (Optional.IsDefined(RequestMessage)) { writer.WritePropertyName("requestMessage"u8); @@ -53,8 +53,8 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn return null; } Optional name = default; - Optional privateLinkResourceId = default; Optional groupId = default; + Optional privateLinkResourceId = default; Optional requestMessage = default; Optional status = default; foreach (var property in element.EnumerateObject()) @@ -73,6 +73,11 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("groupId"u8)) + { + groupId = property0.Value.GetString(); + continue; + } if (property0.NameEquals("privateLinkResourceId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -82,11 +87,6 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn privateLinkResourceId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("groupId"u8)) - { - groupId = property0.Value.GetString(); - continue; - } if (property0.NameEquals("requestMessage"u8)) { requestMessage = property0.Value.GetString(); @@ -105,7 +105,7 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn continue; } } - return new MachineLearningSharedPrivateLinkResource(name.Value, privateLinkResourceId.Value, groupId.Value, requestMessage.Value, Optional.ToNullable(status)); + return new MachineLearningSharedPrivateLinkResource(name.Value, groupId.Value, privateLinkResourceId.Value, requestMessage.Value, Optional.ToNullable(status)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs index db98c3fab6fa9..c8e0325318c21 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs @@ -19,28 +19,28 @@ public MachineLearningSharedPrivateLinkResource() /// Initializes a new instance of MachineLearningSharedPrivateLinkResource. /// Unique name of the private link. - /// The resource id that private link links to. - /// The private link resource group id. + /// group id of the private link. + /// the resource id that private link links to. /// Request message. - /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - internal MachineLearningSharedPrivateLinkResource(string name, ResourceIdentifier privateLinkResourceId, string groupId, string requestMessage, MachineLearningPrivateEndpointServiceConnectionStatus? status) + /// Connection status of the service consumer with the service provider. + internal MachineLearningSharedPrivateLinkResource(string name, string groupId, ResourceIdentifier privateLinkResourceId, string requestMessage, MachineLearningPrivateEndpointServiceConnectionStatus? status) { Name = name; - PrivateLinkResourceId = privateLinkResourceId; GroupId = groupId; + PrivateLinkResourceId = privateLinkResourceId; RequestMessage = requestMessage; Status = status; } /// Unique name of the private link. public string Name { get; set; } - /// The resource id that private link links to. - public ResourceIdentifier PrivateLinkResourceId { get; set; } - /// The private link resource group id. + /// group id of the private link. public string GroupId { get; set; } + /// the resource id that private link links to. + public ResourceIdentifier PrivateLinkResourceId { get; set; } /// Request message. public string RequestMessage { get; set; } - /// 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. public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs index 8b4c8928a2349..bba8a245e8b38 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs @@ -72,6 +72,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("outputs"); } } + if (Optional.IsDefined(QueueSettings)) + { + if (QueueSettings != null) + { + writer.WritePropertyName("queueSettings"u8); + writer.WriteObjectValue(QueueSettings); + } + else + { + writer.WriteNull("queueSettings"); + } + } writer.WritePropertyName("samplingAlgorithm"u8); writer.WriteObjectValue(SamplingAlgorithm); writer.WritePropertyName("searchSpace"u8); @@ -142,6 +154,36 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("jobType"u8); writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + if (Optional.IsCollectionDefined(SecretsConfiguration)) + { + if (SecretsConfiguration != null) + { + writer.WritePropertyName("secretsConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SecretsConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secretsConfiguration"); + } + } if (Optional.IsCollectionDefined(Services)) { if (Services != null) @@ -222,6 +264,7 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE Optional limits = default; MachineLearningObjective objective = default; Optional> outputs = default; + Optional queueSettings = default; SamplingAlgorithm samplingAlgorithm = default; BinaryData searchSpace = default; MachineLearningTrialComponent trial = default; @@ -232,6 +275,8 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE Optional identity = default; Optional isArchived = default; JobType jobType = default; + Optional notificationSetting = default; + Optional> secretsConfiguration = default; Optional> services = default; Optional status = default; Optional description = default; @@ -293,6 +338,16 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE outputs = dictionary; continue; } + if (property.NameEquals("queueSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + queueSettings = null; + continue; + } + queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value); + continue; + } if (property.NameEquals("samplingAlgorithm"u8)) { samplingAlgorithm = SamplingAlgorithm.DeserializeSamplingAlgorithm(property.Value); @@ -367,6 +422,31 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE jobType = new JobType(property.Value.GetString()); continue; } + if (property.NameEquals("notificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notificationSetting = null; + continue; + } + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("secretsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secretsConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SecretConfiguration.DeserializeSecretConfiguration(property0.Value)); + } + secretsConfiguration = dictionary; + continue; + } if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -432,7 +512,7 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE continue; } } - return new MachineLearningSweepJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), earlyTermination.Value, Optional.ToDictionary(inputs), limits.Value, objective, Optional.ToDictionary(outputs), samplingAlgorithm, searchSpace, trial); + return new MachineLearningSweepJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, notificationSetting.Value, Optional.ToDictionary(secretsConfiguration), Optional.ToDictionary(services), Optional.ToNullable(status), earlyTermination.Value, Optional.ToDictionary(inputs), limits.Value, objective, Optional.ToDictionary(outputs), queueSettings.Value, samplingAlgorithm, searchSpace, trial); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs index 72e46105b8912..e0e60006135aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs @@ -56,6 +56,8 @@ public MachineLearningSweepJob(MachineLearningObjective objective, SamplingAlgor /// /// Is the asset archived?. /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. @@ -78,6 +80,7 @@ public MachineLearningSweepJob(MachineLearningObjective objective, SamplingAlgor /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// + /// Queue settings for the job. /// /// [Required] The hyperparameter sampling algorithm /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -85,13 +88,14 @@ public MachineLearningSweepJob(MachineLearningObjective objective, SamplingAlgor /// /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. /// [Required] Trial component definition. - internal MachineLearningSweepJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, MachineLearningEarlyTerminationPolicy earlyTermination, IDictionary inputs, MachineLearningSweepJobLimits limits, MachineLearningObjective objective, IDictionary outputs, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, MachineLearningTrialComponent trial) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + internal MachineLearningSweepJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary secretsConfiguration, IDictionary services, MachineLearningJobStatus? status, MachineLearningEarlyTerminationPolicy earlyTermination, IDictionary inputs, MachineLearningSweepJobLimits limits, MachineLearningObjective objective, IDictionary outputs, JobQueueSettings queueSettings, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, MachineLearningTrialComponent trial) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, secretsConfiguration, services, status) { EarlyTermination = earlyTermination; Inputs = inputs; Limits = limits; Objective = objective; Outputs = outputs; + QueueSettings = queueSettings; SamplingAlgorithm = samplingAlgorithm; SearchSpace = searchSpace; Trial = trial; @@ -120,6 +124,8 @@ internal MachineLearningSweepJob(string description, IDictionary /// The available derived classes include , , , , and . /// public IDictionary Outputs { get; set; } + /// Queue settings for the job. + public JobQueueSettings QueueSettings { get; set; } /// /// [Required] The hyperparameter sampling algorithm /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs index 6e331903ccad4..90969968c5f91 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs @@ -43,6 +43,42 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -113,6 +149,9 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement Optional> referencedUris = default; MachineLearningDataType dataType = default; Uri dataUri = default; + Optional intellectualProperty = default; + Optional stage = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -152,6 +191,36 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement dataUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -211,7 +280,7 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement continue; } } - return new MachineLearningTable(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, Optional.ToList(referencedUris)); + return new MachineLearningTable(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, intellectualProperty.Value, stage.Value, Optional.ToList(referencedUris)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs index ee0bbc6ac701d..edb9bfe0a969b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningTable : MachineLearningDataVersionProperties { /// Initializes a new instance of MachineLearningTable. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. /// is null. public MachineLearningTable(Uri dataUri) : base(dataUri) { @@ -29,12 +29,15 @@ public MachineLearningTable(Uri dataUri) : base(dataUri) /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Intellectual Property details. Used if data is an Intellectual Property. + /// Stage in the data lifecycle assigned to this data asset. /// Uris referenced in the MLTable definition (required for lineage). - internal MachineLearningTable(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IList referencedUris) : base(description, properties, tags, isAnonymous, isArchived, dataType, dataUri) + internal MachineLearningTable(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IntellectualProperty intellectualProperty, string stage, IList referencedUris) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, dataType, dataUri, intellectualProperty, stage) { ReferencedUris = referencedUris; DataType = dataType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs index bff8bbf6df040..0b1babbe49ec2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs @@ -16,6 +16,42 @@ public partial class MachineLearningTableJobOutput : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + if (AssetName != null) + { + writer.WritePropertyName("assetName"u8); + writer.WriteStringValue(AssetName); + } + else + { + writer.WriteNull("assetName"); + } + } + if (Optional.IsDefined(AssetVersion)) + { + if (AssetVersion != null) + { + writer.WritePropertyName("assetVersion"u8); + writer.WriteStringValue(AssetVersion); + } + else + { + writer.WriteNull("assetVersion"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,12 +92,45 @@ internal static MachineLearningTableJobOutput DeserializeMachineLearningTableJob { return null; } + Optional assetName = default; + Optional assetVersion = default; + Optional autoDeleteSetting = default; Optional mode = default; Optional uri = default; Optional description = default; JobOutputType jobOutputType = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("assetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetName = null; + continue; + } + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetVersion = null; + continue; + } + assetVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,7 +166,7 @@ internal static MachineLearningTableJobOutput DeserializeMachineLearningTableJob continue; } } - return new MachineLearningTableJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + return new MachineLearningTableJobOutput(description.Value, jobOutputType, assetName.Value, assetVersion.Value, autoDeleteSetting.Value, Optional.ToNullable(mode), uri.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs index c14fc0ef8b89b..df75da9856782 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs @@ -21,15 +21,27 @@ public MachineLearningTableJobOutput() /// Initializes a new instance of MachineLearningTableJobOutput. /// Description for the output. /// [Required] Specifies the type of job. + /// Output Asset Name. + /// Output Asset Version. + /// Auto delete setting of output data asset. /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningTableJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + internal MachineLearningTableJobOutput(string description, JobOutputType jobOutputType, string assetName, string assetVersion, AutoDeleteSetting autoDeleteSetting, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) { + AssetName = assetName; + AssetVersion = assetVersion; + AutoDeleteSetting = autoDeleteSetting; Mode = mode; Uri = uri; JobOutputType = jobOutputType; } + /// Output Asset Name. + public string AssetName { get; set; } + /// Output Asset Version. + public string AssetVersion { get; set; } + /// Auto delete setting of output data asset. + public AutoDeleteSetting AutoDeleteSetting { get; set; } /// Output Asset Delivery Mode. public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs index 3cf2490c2a484..766e7e02d4faa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs @@ -58,6 +58,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("stackEnsembleSettings"); } } + if (Optional.IsDefined(TrainingMode)) + { + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -74,6 +79,7 @@ internal static MachineLearningTrainingSettings DeserializeMachineLearningTraini Optional enableVoteEnsemble = default; Optional ensembleModelDownloadTimeout = default; Optional stackEnsembleSettings = default; + Optional trainingMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("enableDnnTraining"u8)) @@ -140,8 +146,17 @@ internal static MachineLearningTrainingSettings DeserializeMachineLearningTraini stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); continue; } + if (property.NameEquals("trainingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } } - return new MachineLearningTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value); + return new MachineLearningTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value, Optional.ToNullable(trainingMode)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs index ca9debca59b9d..e70a3100142d1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs @@ -28,7 +28,12 @@ public MachineLearningTrainingSettings() /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// /// Stack ensemble settings for stack ensemble run. - internal MachineLearningTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings) + /// + /// TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + /// If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + /// If 'NonDistributed' then only non distributed algorithms are chosen. + /// + internal MachineLearningTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, TrainingMode? trainingMode) { IsDnnTrainingEnabled = isDnnTrainingEnabled; IsModelExplainabilityEnabled = isModelExplainabilityEnabled; @@ -37,6 +42,7 @@ internal MachineLearningTrainingSettings(bool? isDnnTrainingEnabled, bool? isMod IsVoteEnsembleEnabled = isVoteEnsembleEnabled; EnsembleModelDownloadTimeout = ensembleModelDownloadTimeout; StackEnsembleSettings = stackEnsembleSettings; + TrainingMode = trainingMode; } /// Enable recommendation of DNN models. @@ -56,5 +62,11 @@ internal MachineLearningTrainingSettings(bool? isDnnTrainingEnabled, bool? isMod public TimeSpan? EnsembleModelDownloadTimeout { get; set; } /// Stack ensemble settings for stack ensemble run. public MachineLearningStackEnsembleSettings StackEnsembleSettings { get; set; } + /// + /// TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + /// If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + /// If 'NonDistributed' then only non distributed algorithms are chosen. + /// + public TrainingMode? TrainingMode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs index 85223584c8d26..c30612891db00 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs @@ -34,7 +34,7 @@ public MachineLearningTrialComponent(string command, ResourceIdentifier environm /// /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// /// [Required] The ARM resource ID of the Environment specification for the job. /// Environment variables included in the job. @@ -56,7 +56,7 @@ internal MachineLearningTrialComponent(ResourceIdentifier codeId, string command /// /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// public MachineLearningDistributionConfiguration Distribution { get; set; } /// [Required] The ARM resource ID of the Environment specification for the job. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs index 224fe86fd8a5c..8d285dd6b6cb2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs @@ -16,6 +16,42 @@ public partial class MachineLearningTritonModelJobOutput : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + if (AssetName != null) + { + writer.WritePropertyName("assetName"u8); + writer.WriteStringValue(AssetName); + } + else + { + writer.WriteNull("assetName"); + } + } + if (Optional.IsDefined(AssetVersion)) + { + if (AssetVersion != null) + { + writer.WritePropertyName("assetVersion"u8); + writer.WriteStringValue(AssetVersion); + } + else + { + writer.WriteNull("assetVersion"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,12 +92,45 @@ internal static MachineLearningTritonModelJobOutput DeserializeMachineLearningTr { return null; } + Optional assetName = default; + Optional assetVersion = default; + Optional autoDeleteSetting = default; Optional mode = default; Optional uri = default; Optional description = default; JobOutputType jobOutputType = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("assetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetName = null; + continue; + } + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetVersion = null; + continue; + } + assetVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,7 +166,7 @@ internal static MachineLearningTritonModelJobOutput DeserializeMachineLearningTr continue; } } - return new MachineLearningTritonModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + return new MachineLearningTritonModelJobOutput(description.Value, jobOutputType, assetName.Value, assetVersion.Value, autoDeleteSetting.Value, Optional.ToNullable(mode), uri.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs index bfa417f3839bc..390e5526232f0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs @@ -21,15 +21,27 @@ public MachineLearningTritonModelJobOutput() /// Initializes a new instance of MachineLearningTritonModelJobOutput. /// Description for the output. /// [Required] Specifies the type of job. + /// Output Asset Name. + /// Output Asset Version. + /// Auto delete setting of output data asset. /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningTritonModelJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + internal MachineLearningTritonModelJobOutput(string description, JobOutputType jobOutputType, string assetName, string assetVersion, AutoDeleteSetting autoDeleteSetting, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) { + AssetName = assetName; + AssetVersion = assetVersion; + AutoDeleteSetting = autoDeleteSetting; Mode = mode; Uri = uri; JobOutputType = jobOutputType; } + /// Output Asset Name. + public string AssetName { get; set; } + /// Output Asset Version. + public string AssetVersion { get; set; } + /// Auto delete setting of output data asset. + public AutoDeleteSetting AutoDeleteSetting { get; set; } /// Output Asset Delivery Mode. public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs index 6a30fe4cebf3b..3d0f56a70a3a1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs @@ -21,6 +21,42 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -90,6 +126,9 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF } MachineLearningDataType dataType = default; Uri dataUri = default; + Optional intellectualProperty = default; + Optional stage = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -107,6 +146,36 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF dataUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -166,7 +235,7 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF continue; } } - return new MachineLearningUriFileDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); + return new MachineLearningUriFileDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, intellectualProperty.Value, stage.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs index 7bcd4512e1bf1..2b6a2abd921da 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningUriFileDataVersion : MachineLearningDataVersionProperties { /// Initializes a new instance of MachineLearningUriFileDataVersion. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. /// is null. public MachineLearningUriFileDataVersion(Uri dataUri) : base(dataUri) { @@ -28,11 +28,14 @@ public MachineLearningUriFileDataVersion(Uri dataUri) : base(dataUri) /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - internal MachineLearningUriFileDataVersion(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived, dataType, dataUri) + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Intellectual Property details. Used if data is an Intellectual Property. + /// Stage in the data lifecycle assigned to this data asset. + internal MachineLearningUriFileDataVersion(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IntellectualProperty intellectualProperty, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, dataType, dataUri, intellectualProperty, stage) { DataType = dataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs index f2cf5cdcdd0fc..682055ce178e5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs @@ -16,6 +16,42 @@ public partial class MachineLearningUriFileJobOutput : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + if (AssetName != null) + { + writer.WritePropertyName("assetName"u8); + writer.WriteStringValue(AssetName); + } + else + { + writer.WriteNull("assetName"); + } + } + if (Optional.IsDefined(AssetVersion)) + { + if (AssetVersion != null) + { + writer.WritePropertyName("assetVersion"u8); + writer.WriteStringValue(AssetVersion); + } + else + { + writer.WriteNull("assetVersion"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,12 +92,45 @@ internal static MachineLearningUriFileJobOutput DeserializeMachineLearningUriFil { return null; } + Optional assetName = default; + Optional assetVersion = default; + Optional autoDeleteSetting = default; Optional mode = default; Optional uri = default; Optional description = default; JobOutputType jobOutputType = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("assetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetName = null; + continue; + } + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetVersion = null; + continue; + } + assetVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,7 +166,7 @@ internal static MachineLearningUriFileJobOutput DeserializeMachineLearningUriFil continue; } } - return new MachineLearningUriFileJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + return new MachineLearningUriFileJobOutput(description.Value, jobOutputType, assetName.Value, assetVersion.Value, autoDeleteSetting.Value, Optional.ToNullable(mode), uri.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs index 5100d90a09e4d..08d58a3d8870e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs @@ -21,15 +21,27 @@ public MachineLearningUriFileJobOutput() /// Initializes a new instance of MachineLearningUriFileJobOutput. /// Description for the output. /// [Required] Specifies the type of job. + /// Output Asset Name. + /// Output Asset Version. + /// Auto delete setting of output data asset. /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningUriFileJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + internal MachineLearningUriFileJobOutput(string description, JobOutputType jobOutputType, string assetName, string assetVersion, AutoDeleteSetting autoDeleteSetting, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) { + AssetName = assetName; + AssetVersion = assetVersion; + AutoDeleteSetting = autoDeleteSetting; Mode = mode; Uri = uri; JobOutputType = jobOutputType; } + /// Output Asset Name. + public string AssetName { get; set; } + /// Output Asset Version. + public string AssetVersion { get; set; } + /// Auto delete setting of output data asset. + public AutoDeleteSetting AutoDeleteSetting { get; set; } /// Output Asset Delivery Mode. public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs index 82f701862d9c2..edb36e134cb4a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs @@ -21,6 +21,42 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } + if (Optional.IsDefined(Stage)) + { + if (Stage != null) + { + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); + } + else + { + writer.WriteNull("stage"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(IsAnonymous)) { writer.WritePropertyName("isAnonymous"u8); @@ -90,6 +126,9 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr } MachineLearningDataType dataType = default; Uri dataUri = default; + Optional intellectualProperty = default; + Optional stage = default; + Optional autoDeleteSetting = default; Optional isAnonymous = default; Optional isArchived = default; Optional description = default; @@ -107,6 +146,36 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr dataUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } + if (property.NameEquals("stage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stage = null; + continue; + } + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -166,7 +235,7 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr continue; } } - return new MachineLearningUriFolderDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); + return new MachineLearningUriFolderDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), autoDeleteSetting.Value, Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, intellectualProperty.Value, stage.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs index f2f252cfad950..8dd579eadf99e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningUriFolderDataVersion : MachineLearningDataVersionProperties { /// Initializes a new instance of MachineLearningUriFolderDataVersion. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. /// is null. public MachineLearningUriFolderDataVersion(Uri dataUri) : base(dataUri) { @@ -28,11 +28,14 @@ public MachineLearningUriFolderDataVersion(Uri dataUri) : base(dataUri) /// The asset description text. /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. + /// Specifies the lifecycle setting of managed data asset. + /// If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + /// Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived. /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - internal MachineLearningUriFolderDataVersion(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived, dataType, dataUri) + /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Intellectual Property details. Used if data is an Intellectual Property. + /// Stage in the data lifecycle assigned to this data asset. + internal MachineLearningUriFolderDataVersion(string description, IDictionary properties, IDictionary tags, AutoDeleteSetting autoDeleteSetting, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IntellectualProperty intellectualProperty, string stage) : base(description, properties, tags, autoDeleteSetting, isAnonymous, isArchived, dataType, dataUri, intellectualProperty, stage) { DataType = dataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs index 26577085073af..268794cc98da1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs @@ -16,6 +16,42 @@ public partial class MachineLearningUriFolderJobOutput : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + if (AssetName != null) + { + writer.WritePropertyName("assetName"u8); + writer.WriteStringValue(AssetName); + } + else + { + writer.WriteNull("assetName"); + } + } + if (Optional.IsDefined(AssetVersion)) + { + if (AssetVersion != null) + { + writer.WritePropertyName("assetVersion"u8); + writer.WriteStringValue(AssetVersion); + } + else + { + writer.WriteNull("assetVersion"); + } + } + if (Optional.IsDefined(AutoDeleteSetting)) + { + if (AutoDeleteSetting != null) + { + writer.WritePropertyName("autoDeleteSetting"u8); + writer.WriteObjectValue(AutoDeleteSetting); + } + else + { + writer.WriteNull("autoDeleteSetting"); + } + } if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,12 +92,45 @@ internal static MachineLearningUriFolderJobOutput DeserializeMachineLearningUriF { return null; } + Optional assetName = default; + Optional assetVersion = default; + Optional autoDeleteSetting = default; Optional mode = default; Optional uri = default; Optional description = default; JobOutputType jobOutputType = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("assetName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetName = null; + continue; + } + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + assetVersion = null; + continue; + } + assetVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoDeleteSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + autoDeleteSetting = null; + continue; + } + autoDeleteSetting = AutoDeleteSetting.DeserializeAutoDeleteSetting(property.Value); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,7 +166,7 @@ internal static MachineLearningUriFolderJobOutput DeserializeMachineLearningUriF continue; } } - return new MachineLearningUriFolderJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + return new MachineLearningUriFolderJobOutput(description.Value, jobOutputType, assetName.Value, assetVersion.Value, autoDeleteSetting.Value, Optional.ToNullable(mode), uri.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs index c071c23b9044d..6aaacd422fe4a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs @@ -21,15 +21,27 @@ public MachineLearningUriFolderJobOutput() /// Initializes a new instance of MachineLearningUriFolderJobOutput. /// Description for the output. /// [Required] Specifies the type of job. + /// Output Asset Name. + /// Output Asset Version. + /// Auto delete setting of output data asset. /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningUriFolderJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + internal MachineLearningUriFolderJobOutput(string description, JobOutputType jobOutputType, string assetName, string assetVersion, AutoDeleteSetting autoDeleteSetting, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) { + AssetName = assetName; + AssetVersion = assetVersion; + AutoDeleteSetting = autoDeleteSetting; Mode = mode; Uri = uri; JobOutputType = jobOutputType; } + /// Output Asset Name. + public string AssetName { get; set; } + /// Output Asset Version. + public string AssetVersion { get; set; } + /// Auto delete setting of output data asset. + public AutoDeleteSetting AutoDeleteSetting { get; set; } /// Output Asset Delivery Mode. public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs index bb9c8c452eef2..6b063b6965a36 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -27,20 +28,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(ExpiryOn)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Metadata)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif } - if (Optional.IsDefined(ValueFormat)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("valueFormat"u8); - writer.WriteStringValue(ValueFormat.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } writer.WriteEndObject(); } @@ -54,9 +59,9 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser Optional credentials = default; MachineLearningConnectionAuthType authType = default; Optional category = default; + Optional expiryTime = default; + Optional metadata = default; Optional target = default; - Optional value = default; - Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("credentials"u8)) @@ -82,27 +87,31 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser category = new MachineLearningConnectionCategory(property.Value.GetString()); continue; } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) + if (property.NameEquals("expiryTime"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("valueFormat"u8)) + if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); continue; } } - return new MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + return new MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs index c2fa44ac5aa61..62f50c976bfbd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.MachineLearning.Models { /// The MachineLearningUsernamePasswordAuthTypeWorkspaceConnection. @@ -19,11 +21,11 @@ public MachineLearningUsernamePasswordAuthTypeWorkspaceConnection() /// Initializes a new instance of MachineLearningUsernamePasswordAuthTypeWorkspaceConnection. /// Authentication type of the connection target. /// Category of the connection. + /// + /// Any object. /// - /// Value details of the workspace connection. - /// format for the workspace connection value. /// - internal MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, MachineLearningWorkspaceConnectionUsernamePassword credentials) : base(authType, category, target, value, valueFormat) + internal MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, MachineLearningWorkspaceConnectionUsernamePassword credentials) : base(authType, category, expiryOn, metadata, target) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs new file mode 100644 index 0000000000000..5f53c87168e17 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWebhook : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventType)) + { + if (EventType != null) + { + writer.WritePropertyName("eventType"u8); + writer.WriteStringValue(EventType); + } + else + { + writer.WriteNull("eventType"); + } + } + writer.WritePropertyName("webhookType"u8); + writer.WriteStringValue(WebhookType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningWebhook DeserializeMachineLearningWebhook(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("webhookType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureDevOps": return AzureDevOpsWebhook.DeserializeAzureDevOpsWebhook(element); + } + } + return UnknownWebhook.DeserializeUnknownWebhook(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs new file mode 100644 index 0000000000000..70ad7b8f19b74 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Webhook base + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class MachineLearningWebhook + { + /// Initializes a new instance of MachineLearningWebhook. + protected MachineLearningWebhook() + { + } + + /// Initializes a new instance of MachineLearningWebhook. + /// Send callback on a specified notification event. + /// [Required] Specifies the type of service to send a callback. + internal MachineLearningWebhook(string eventType, MachineLearningWebhookType webhookType) + { + EventType = eventType; + WebhookType = webhookType; + } + + /// Send callback on a specified notification event. + public string EventType { get; set; } + /// [Required] Specifies the type of service to send a callback. + internal MachineLearningWebhookType WebhookType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhookType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhookType.cs new file mode 100644 index 0000000000000..8e04dba24e1e1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhookType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine the webhook callback service type. + internal readonly partial struct MachineLearningWebhookType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningWebhookType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureDevOpsValue = "AzureDevOps"; + + /// AzureDevOps. + public static MachineLearningWebhookType AzureDevOps { get; } = new MachineLearningWebhookType(AzureDevOpsValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningWebhookType left, MachineLearningWebhookType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningWebhookType left, MachineLearningWebhookType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningWebhookType(string value) => new MachineLearningWebhookType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningWebhookType other && Equals(other); + /// + public bool Equals(MachineLearningWebhookType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs index 487825cccc5fb..c0452eade5e39 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs @@ -15,16 +15,16 @@ public partial class MachineLearningWorkspaceConnectionManagedIdentity : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); writer.WriteStringValue(ClientId); } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } writer.WriteEndObject(); } @@ -34,10 +34,15 @@ internal static MachineLearningWorkspaceConnectionManagedIdentity DeserializeMac { return null; } - Optional resourceId = default; Optional clientId = default; + Optional resourceId = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } if (property.NameEquals("resourceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -47,13 +52,8 @@ internal static MachineLearningWorkspaceConnectionManagedIdentity DeserializeMac resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("clientId"u8)) - { - clientId = property.Value.GetString(); - continue; - } } - return new MachineLearningWorkspaceConnectionManagedIdentity(resourceId.Value, clientId.Value); + return new MachineLearningWorkspaceConnectionManagedIdentity(clientId.Value, resourceId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs index 7df7012e88715..a8826bd299bf5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs @@ -18,17 +18,17 @@ public MachineLearningWorkspaceConnectionManagedIdentity() } /// Initializes a new instance of MachineLearningWorkspaceConnectionManagedIdentity. - /// /// - internal MachineLearningWorkspaceConnectionManagedIdentity(ResourceIdentifier resourceId, string clientId) + /// + internal MachineLearningWorkspaceConnectionManagedIdentity(string clientId, ResourceIdentifier resourceId) { - ResourceId = resourceId; ClientId = clientId; + ResourceId = resourceId; } - /// Gets or sets the resource id. - public ResourceIdentifier ResourceId { get; set; } /// Gets or sets the client id. public string ClientId { get; set; } + /// Gets or sets the resource id. + public ResourceIdentifier ResourceId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.Serialization.cs new file mode 100644 index 0000000000000..901eb4cc5d617 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceConnectionPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.cs new file mode 100644 index 0000000000000..fde4e47b61fc7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The properties that the machine learning workspace connection will be updated with. + public partial class MachineLearningWorkspaceConnectionPatch + { + /// Initializes a new instance of MachineLearningWorkspaceConnectionPatch. + public MachineLearningWorkspaceConnectionPatch() + { + } + + /// + /// The properties that the machine learning workspace connection will be updated with. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , and . + /// + public MachineLearningWorkspaceConnectionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs index c6e706ae0f6c1..9f8112df12653 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs @@ -22,20 +22,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(ExpiryOn)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Metadata)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif } - if (Optional.IsDefined(ValueFormat)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("valueFormat"u8); - writer.WriteStringValue(ValueFormat.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } writer.WriteEndObject(); } @@ -50,10 +54,14 @@ internal static MachineLearningWorkspaceConnectionProperties DeserializeMachineL { switch (discriminator.GetString()) { + case "AccessKey": return AccessKeyAuthTypeWorkspaceConnectionProperties.DeserializeAccessKeyAuthTypeWorkspaceConnectionProperties(element); + case "ApiKey": return ApiKeyAuthWorkspaceConnectionProperties.DeserializeApiKeyAuthWorkspaceConnectionProperties(element); + case "CustomKeys": return CustomKeysWorkspaceConnectionProperties.DeserializeCustomKeysWorkspaceConnectionProperties(element); case "ManagedIdentity": return MachineLearningManagedIdentityAuthTypeWorkspaceConnection.DeserializeMachineLearningManagedIdentityAuthTypeWorkspaceConnection(element); case "None": return MachineLearningNoneAuthTypeWorkspaceConnection.DeserializeMachineLearningNoneAuthTypeWorkspaceConnection(element); case "PAT": return MachineLearningPatAuthTypeWorkspaceConnection.DeserializeMachineLearningPatAuthTypeWorkspaceConnection(element); case "SAS": return MachineLearningSasAuthTypeWorkspaceConnection.DeserializeMachineLearningSasAuthTypeWorkspaceConnection(element); + case "ServicePrincipal": return ServicePrincipalAuthTypeWorkspaceConnectionProperties.DeserializeServicePrincipalAuthTypeWorkspaceConnectionProperties(element); case "UsernamePassword": return MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.DeserializeMachineLearningUsernamePasswordAuthTypeWorkspaceConnection(element); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs index 7c91af0ee7cd2..af8e0fd100ec7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs @@ -5,12 +5,14 @@ #nullable disable +using System; + namespace Azure.ResourceManager.MachineLearning.Models { /// /// The MachineLearningWorkspaceConnectionProperties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , , , and . /// public abstract partial class MachineLearningWorkspaceConnectionProperties { @@ -22,27 +24,56 @@ protected MachineLearningWorkspaceConnectionProperties() /// Initializes a new instance of MachineLearningWorkspaceConnectionProperties. /// Authentication type of the connection target. /// Category of the connection. + /// + /// Any object. /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - internal MachineLearningWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat) + internal MachineLearningWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target) { AuthType = authType; Category = category; + ExpiryOn = expiryOn; + Metadata = metadata; Target = target; - Value = value; - ValueFormat = valueFormat; } /// Authentication type of the connection target. internal MachineLearningConnectionAuthType AuthType { get; set; } /// Category of the connection. public MachineLearningConnectionCategory? Category { get; set; } + /// Gets or sets the expiry on. + public DateTimeOffset? ExpiryOn { get; set; } + /// + /// Any object + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Metadata { get; set; } /// Gets or sets the target. public string Target { get; set; } - /// Value details of the workspace connection. - public string Value { get; set; } - /// format for the workspace connection value. - public MachineLearningValueFormat? ValueFormat { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs index 2d3311eabc68a..20d7fb52e1eca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs @@ -15,16 +15,16 @@ public partial class MachineLearningWorkspaceConnectionUsernamePassword : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - writer.WriteStringValue(Username); - } if (Optional.IsDefined(Password)) { writer.WritePropertyName("password"u8); writer.WriteStringValue(Password); } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } writer.WriteEndObject(); } @@ -34,22 +34,22 @@ internal static MachineLearningWorkspaceConnectionUsernamePassword DeserializeMa { return null; } - Optional username = default; Optional password = default; + Optional username = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("username"u8)) + if (property.NameEquals("password"u8)) { - username = property.Value.GetString(); + password = property.Value.GetString(); continue; } - if (property.NameEquals("password"u8)) + if (property.NameEquals("username"u8)) { - password = property.Value.GetString(); + username = property.Value.GetString(); continue; } } - return new MachineLearningWorkspaceConnectionUsernamePassword(username.Value, password.Value); + return new MachineLearningWorkspaceConnectionUsernamePassword(password.Value, username.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs index a6cea4dbc5e7b..5ac8330423c44 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs @@ -16,17 +16,17 @@ public MachineLearningWorkspaceConnectionUsernamePassword() } /// Initializes a new instance of MachineLearningWorkspaceConnectionUsernamePassword. - /// /// - internal MachineLearningWorkspaceConnectionUsernamePassword(string username, string password) + /// + internal MachineLearningWorkspaceConnectionUsernamePassword(string password, string username) { - Username = username; Password = password; + Username = username; } - /// Gets or sets the username. - public string Username { get; set; } /// Gets or sets the password. public string Password { get; set; } + /// Gets or sets the username. + public string Username { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs index ddfe2bab9932e..1beb1c533b26f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs @@ -25,6 +25,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -45,72 +50,130 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Location); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(KeyVault)) + if (Optional.IsDefined(AllowPublicAccessWhenBehindVnet)) { - writer.WritePropertyName("keyVault"u8); - writer.WriteStringValue(KeyVault); + writer.WritePropertyName("allowPublicAccessWhenBehindVnet"u8); + writer.WriteBooleanValue(AllowPublicAccessWhenBehindVnet.Value); } if (Optional.IsDefined(ApplicationInsights)) { writer.WritePropertyName("applicationInsights"u8); writer.WriteStringValue(ApplicationInsights); } - if (Optional.IsDefined(ContainerRegistry)) + if (Optional.IsCollectionDefined(AssociatedWorkspaces)) { - if (ContainerRegistry != null) + writer.WritePropertyName("associatedWorkspaces"u8); + writer.WriteStartArray(); + foreach (var item in AssociatedWorkspaces) { - writer.WritePropertyName("containerRegistry"u8); - writer.WriteStringValue(ContainerRegistry); + writer.WriteStringValue(item); } - else + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ContainerRegistries)) + { + writer.WritePropertyName("containerRegistries"u8); + writer.WriteStartArray(); + foreach (var item in ContainerRegistries) { - writer.WriteNull("containerRegistry"); + writer.WriteStringValue(item); } + writer.WriteEndArray(); } - if (Optional.IsDefined(StorageAccount)) + if (Optional.IsDefined(ContainerRegistry)) { - writer.WritePropertyName("storageAccount"u8); - writer.WriteStringValue(StorageAccount); + writer.WritePropertyName("containerRegistry"u8); + writer.WriteStringValue(ContainerRegistry); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } if (Optional.IsDefined(DiscoveryUri)) { writer.WritePropertyName("discoveryUrl"u8); writer.WriteStringValue(DiscoveryUri.AbsoluteUri); } + if (Optional.IsDefined(EnableDataIsolation)) + { + writer.WritePropertyName("enableDataIsolation"u8); + writer.WriteBooleanValue(EnableDataIsolation.Value); + } if (Optional.IsDefined(Encryption)) { writer.WritePropertyName("encryption"u8); writer.WriteObjectValue(Encryption); } + if (Optional.IsCollectionDefined(ExistingWorkspaces)) + { + writer.WritePropertyName("existingWorkspaces"u8); + writer.WriteStartArray(); + foreach (var item in ExistingWorkspaces) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(FeatureStoreSettings)) + { + writer.WritePropertyName("featureStoreSettings"u8); + writer.WriteObjectValue(FeatureStoreSettings); + } + if (Optional.IsDefined(FriendlyName)) + { + writer.WritePropertyName("friendlyName"u8); + writer.WriteStringValue(FriendlyName); + } if (Optional.IsDefined(IsHbiWorkspace)) { writer.WritePropertyName("hbiWorkspace"u8); writer.WriteBooleanValue(IsHbiWorkspace.Value); } + if (Optional.IsDefined(HubResourceId)) + { + writer.WritePropertyName("hubResourceId"u8); + writer.WriteStringValue(HubResourceId); + } if (Optional.IsDefined(ImageBuildCompute)) { writer.WritePropertyName("imageBuildCompute"u8); writer.WriteStringValue(ImageBuildCompute); } - if (Optional.IsDefined(AllowPublicAccessWhenBehindVnet)) + if (Optional.IsDefined(KeyVault)) { - writer.WritePropertyName("allowPublicAccessWhenBehindVnet"u8); - writer.WriteBooleanValue(AllowPublicAccessWhenBehindVnet.Value); + writer.WritePropertyName("keyVault"u8); + writer.WriteStringValue(KeyVault); } - if (Optional.IsDefined(PublicNetworkAccess)) + if (Optional.IsCollectionDefined(KeyVaults)) + { + writer.WritePropertyName("keyVaults"u8); + writer.WriteStartArray(); + foreach (var item in KeyVaults) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ManagedNetwork)) + { + writer.WritePropertyName("managedNetwork"u8); + writer.WriteObjectValue(ManagedNetwork); + } + if (Optional.IsDefined(PrimaryUserAssignedIdentity)) + { + writer.WritePropertyName("primaryUserAssignedIdentity"u8); + writer.WriteStringValue(PrimaryUserAssignedIdentity); + } + if (Optional.IsDefined(PublicNetworkAccessType)) { writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + writer.WriteStringValue(PublicNetworkAccessType.Value.ToString()); + } + if (Optional.IsDefined(ServiceManagedResourcesSettings)) + { + writer.WritePropertyName("serviceManagedResourcesSettings"u8); + writer.WriteObjectValue(ServiceManagedResourcesSettings); } if (Optional.IsCollectionDefined(SharedPrivateLinkResources)) { @@ -122,21 +185,41 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(ServiceManagedResourcesSettings)) + if (Optional.IsDefined(SoftDeleteRetentionInDays)) { - writer.WritePropertyName("serviceManagedResourcesSettings"u8); - writer.WriteObjectValue(ServiceManagedResourcesSettings); + writer.WritePropertyName("softDeleteRetentionInDays"u8); + writer.WriteNumberValue(SoftDeleteRetentionInDays.Value); } - if (Optional.IsDefined(PrimaryUserAssignedIdentity)) + if (Optional.IsDefined(StorageAccount)) { - writer.WritePropertyName("primaryUserAssignedIdentity"u8); - writer.WriteStringValue(PrimaryUserAssignedIdentity); + writer.WritePropertyName("storageAccount"u8); + writer.WriteStringValue(StorageAccount); + } + if (Optional.IsCollectionDefined(StorageAccounts)) + { + writer.WritePropertyName("storageAccounts"u8); + writer.WriteStartArray(); + foreach (var item in StorageAccounts) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SystemDatastoresAuthMode)) + { + writer.WritePropertyName("systemDatastoresAuthMode"u8); + writer.WriteStringValue(SystemDatastoresAuthMode); } if (Optional.IsDefined(IsV1LegacyMode)) { writer.WritePropertyName("v1LegacyMode"u8); writer.WriteBooleanValue(IsV1LegacyMode.Value); } + if (Optional.IsDefined(WorkspaceHubConfig)) + { + writer.WritePropertyName("workspaceHubConfig"u8); + writer.WriteObjectValue(WorkspaceHubConfig); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -148,6 +231,7 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace return null; } Optional identity = default; + Optional kind = default; Optional sku = default; Optional> tags = default; AzureLocation location = default; @@ -155,31 +239,43 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace string name = default; ResourceType type = default; Optional systemData = default; - Optional workspaceId = default; - Optional description = default; - Optional friendlyName = default; - Optional keyVault = default; + Optional allowPublicAccessWhenBehindVnet = default; Optional applicationInsights = default; + Optional> associatedWorkspaces = default; + Optional> containerRegistries = default; Optional containerRegistry = default; - Optional storageAccount = default; + Optional description = default; Optional discoveryUrl = default; - Optional provisioningState = default; + Optional enableDataIsolation = default; Optional encryption = default; + Optional> existingWorkspaces = default; + Optional featureStoreSettings = default; + Optional friendlyName = default; Optional hbiWorkspace = default; - Optional serviceProvisionedResourceGroup = default; - Optional privateLinkCount = default; + Optional hubResourceId = default; Optional imageBuildCompute = default; - Optional allowPublicAccessWhenBehindVnet = default; - Optional publicNetworkAccess = default; - Optional> privateEndpointConnections = default; - Optional> sharedPrivateLinkResources = default; + Optional keyVault = default; + Optional> keyVaults = default; + Optional managedNetwork = default; + Optional mlFlowTrackingUri = default; Optional notebookInfo = default; - Optional serviceManagedResourcesSettings = default; Optional primaryUserAssignedIdentity = default; - Optional tenantId = default; + Optional> privateEndpointConnections = default; + Optional privateLinkCount = default; + Optional provisioningState = default; + Optional publicNetworkAccess = default; + Optional serviceManagedResourcesSettings = default; + Optional serviceProvisionedResourceGroup = default; + Optional> sharedPrivateLinkResources = default; + Optional softDeleteRetentionInDays = default; + Optional storageAccount = default; + Optional> storageAccounts = default; Optional storageHnsEnabled = default; - Optional mlFlowTrackingUri = default; + Optional systemDatastoresAuthMode = default; + Optional tenantId = default; Optional v1LegacyMode = default; + Optional workspaceHubConfig = default; + Optional workspaceId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("identity"u8)) @@ -192,6 +288,11 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } if (property.NameEquals("sku"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -253,71 +354,111 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("workspaceId"u8)) + if (property0.NameEquals("allowPublicAccessWhenBehindVnet"u8)) { - workspaceId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowPublicAccessWhenBehindVnet = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("description"u8)) + if (property0.NameEquals("applicationInsights"u8)) { - description = property0.Value.GetString(); + applicationInsights = property0.Value.GetString(); continue; } - if (property0.NameEquals("friendlyName"u8)) + if (property0.NameEquals("associatedWorkspaces"u8)) { - friendlyName = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + associatedWorkspaces = array; continue; } - if (property0.NameEquals("keyVault"u8)) + if (property0.NameEquals("containerRegistries"u8)) { - keyVault = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + containerRegistries = array; continue; } - if (property0.NameEquals("applicationInsights"u8)) + if (property0.NameEquals("containerRegistry"u8)) { - applicationInsights = property0.Value.GetString(); + containerRegistry = property0.Value.GetString(); continue; } - if (property0.NameEquals("containerRegistry"u8)) + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("discoveryUrl"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { - containerRegistry = null; continue; } - containerRegistry = property0.Value.GetString(); + discoveryUrl = new Uri(property0.Value.GetString()); continue; } - if (property0.NameEquals("storageAccount"u8)) + if (property0.NameEquals("enableDataIsolation"u8)) { - storageAccount = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableDataIsolation = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("discoveryUrl"u8)) + if (property0.NameEquals("encryption"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - discoveryUrl = new Uri(property0.Value.GetString()); + encryption = MachineLearningEncryptionSetting.DeserializeMachineLearningEncryptionSetting(property0.Value); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("existingWorkspaces"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new MachineLearningProvisioningState(property0.Value.GetString()); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + existingWorkspaces = array; continue; } - if (property0.NameEquals("encryption"u8)) + if (property0.NameEquals("featureStoreSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - encryption = MachineLearningEncryptionSetting.DeserializeMachineLearningEncryptionSetting(property0.Value); + featureStoreSettings = FeatureStoreSettings.DeserializeFeatureStoreSettings(property0.Value); + continue; + } + if (property0.NameEquals("friendlyName"u8)) + { + friendlyName = property0.Value.GetString(); continue; } if (property0.NameEquals("hbiWorkspace"u8)) @@ -329,41 +470,69 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace hbiWorkspace = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("serviceProvisionedResourceGroup"u8)) + if (property0.NameEquals("hubResourceId"u8)) { - serviceProvisionedResourceGroup = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hubResourceId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("privateLinkCount"u8)) + if (property0.NameEquals("imageBuildCompute"u8)) + { + imageBuildCompute = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("keyVault"u8)) + { + keyVault = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("keyVaults"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - privateLinkCount = property0.Value.GetInt32(); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + keyVaults = array; continue; } - if (property0.NameEquals("imageBuildCompute"u8)) + if (property0.NameEquals("managedNetwork"u8)) { - imageBuildCompute = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedNetwork = ManagedNetworkSettings.DeserializeManagedNetworkSettings(property0.Value); continue; } - if (property0.NameEquals("allowPublicAccessWhenBehindVnet"u8)) + if (property0.NameEquals("mlFlowTrackingUri"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - allowPublicAccessWhenBehindVnet = property0.Value.GetBoolean(); + mlFlowTrackingUri = new Uri(property0.Value.GetString()); continue; } - if (property0.NameEquals("publicNetworkAccess"u8)) + if (property0.NameEquals("notebookInfo"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - publicNetworkAccess = new MachineLearningPublicNetworkAccess(property0.Value.GetString()); + notebookInfo = MachineLearningNotebookResourceInfo.DeserializeMachineLearningNotebookResourceInfo(property0.Value); + continue; + } + if (property0.NameEquals("primaryUserAssignedIdentity"u8)) + { + primaryUserAssignedIdentity = property0.Value.GetString(); continue; } if (property0.NameEquals("privateEndpointConnections"u8)) @@ -380,27 +549,31 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace privateEndpointConnections = array; continue; } - if (property0.NameEquals("sharedPrivateLinkResources"u8)) + if (property0.NameEquals("privateLinkCount"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) + privateLinkCount = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) { - array.Add(MachineLearningSharedPrivateLinkResource.DeserializeMachineLearningSharedPrivateLinkResource(item)); + continue; } - sharedPrivateLinkResources = array; + provisioningState = new MachineLearningProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("notebookInfo"u8)) + if (property0.NameEquals("publicNetworkAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - notebookInfo = MachineLearningNotebookResourceInfo.DeserializeMachineLearningNotebookResourceInfo(property0.Value); + publicNetworkAccess = new MachineLearningPublicNetworkAccessType(property0.Value.GetString()); continue; } if (property0.NameEquals("serviceManagedResourcesSettings"u8)) @@ -412,18 +585,51 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace serviceManagedResourcesSettings = ServiceManagedResourcesSettings.DeserializeServiceManagedResourcesSettings(property0.Value); continue; } - if (property0.NameEquals("primaryUserAssignedIdentity"u8)) + if (property0.NameEquals("serviceProvisionedResourceGroup"u8)) { - primaryUserAssignedIdentity = property0.Value.GetString(); + serviceProvisionedResourceGroup = property0.Value.GetString(); continue; } - if (property0.NameEquals("tenantId"u8)) + if (property0.NameEquals("sharedPrivateLinkResources"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - tenantId = property0.Value.GetGuid(); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(MachineLearningSharedPrivateLinkResource.DeserializeMachineLearningSharedPrivateLinkResource(item)); + } + sharedPrivateLinkResources = array; + continue; + } + if (property0.NameEquals("softDeleteRetentionInDays"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softDeleteRetentionInDays = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("storageAccount"u8)) + { + storageAccount = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("storageAccounts"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + storageAccounts = array; continue; } if (property0.NameEquals("storageHnsEnabled"u8)) @@ -435,13 +641,18 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace storageHnsEnabled = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("mlFlowTrackingUri"u8)) + if (property0.NameEquals("systemDatastoresAuthMode"u8)) + { + systemDatastoresAuthMode = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("tenantId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - mlFlowTrackingUri = new Uri(property0.Value.GetString()); + tenantId = property0.Value.GetGuid(); continue; } if (property0.NameEquals("v1LegacyMode"u8)) @@ -453,11 +664,25 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace v1LegacyMode = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("workspaceHubConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceHubConfig = WorkspaceHubConfig.DeserializeWorkspaceHubConfig(property0.Value); + continue; + } + if (property0.NameEquals("workspaceId"u8)) + { + workspaceId = property0.Value.GetString(); + continue; + } } continue; } } - return new MachineLearningWorkspaceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, sku.Value, workspaceId.Value, description.Value, friendlyName.Value, keyVault.Value, applicationInsights.Value, containerRegistry.Value, storageAccount.Value, discoveryUrl.Value, Optional.ToNullable(provisioningState), encryption.Value, Optional.ToNullable(hbiWorkspace), serviceProvisionedResourceGroup.Value, Optional.ToNullable(privateLinkCount), imageBuildCompute.Value, Optional.ToNullable(allowPublicAccessWhenBehindVnet), Optional.ToNullable(publicNetworkAccess), Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources), notebookInfo.Value, serviceManagedResourcesSettings.Value, primaryUserAssignedIdentity.Value, Optional.ToNullable(tenantId), Optional.ToNullable(storageHnsEnabled), mlFlowTrackingUri.Value, Optional.ToNullable(v1LegacyMode)); + return new MachineLearningWorkspaceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, sku.Value, Optional.ToNullable(allowPublicAccessWhenBehindVnet), applicationInsights.Value, Optional.ToList(associatedWorkspaces), Optional.ToList(containerRegistries), containerRegistry.Value, description.Value, discoveryUrl.Value, Optional.ToNullable(enableDataIsolation), encryption.Value, Optional.ToList(existingWorkspaces), featureStoreSettings.Value, friendlyName.Value, Optional.ToNullable(hbiWorkspace), hubResourceId.Value, imageBuildCompute.Value, keyVault.Value, Optional.ToList(keyVaults), managedNetwork.Value, mlFlowTrackingUri.Value, notebookInfo.Value, primaryUserAssignedIdentity.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(privateLinkCount), Optional.ToNullable(provisioningState), Optional.ToNullable(publicNetworkAccess), serviceManagedResourcesSettings.Value, serviceProvisionedResourceGroup.Value, Optional.ToList(sharedPrivateLinkResources), Optional.ToNullable(softDeleteRetentionInDays), storageAccount.Value, Optional.ToList(storageAccounts), Optional.ToNullable(storageHnsEnabled), systemDatastoresAuthMode.Value, Optional.ToNullable(tenantId), Optional.ToNullable(v1LegacyMode), workspaceHubConfig.Value, workspaceId.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs index 8b184dd60ff30..70cc611de69e4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs @@ -15,7 +15,7 @@ public MachineLearningWorkspaceDiagnoseContent() { } - /// Value of Parameters. + /// Gets or sets the value. public MachineLearningWorkspaceDiagnoseProperties Value { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs index 7d042fc72dce2..0b750b4ba4888 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs @@ -15,11 +15,11 @@ public partial class MachineLearningWorkspaceDiagnoseProperties : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Udr)) + if (Optional.IsCollectionDefined(ApplicationInsights)) { - writer.WritePropertyName("udr"u8); + writer.WritePropertyName("applicationInsights"u8); writer.WriteStartObject(); - foreach (var item in Udr) + foreach (var item in ApplicationInsights) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -35,11 +35,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(Nsg)) + if (Optional.IsCollectionDefined(ContainerRegistry)) { - writer.WritePropertyName("nsg"u8); + writer.WritePropertyName("containerRegistry"u8); writer.WriteStartObject(); - foreach (var item in Nsg) + foreach (var item in ContainerRegistry) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -55,11 +55,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(ResourceLock)) + if (Optional.IsCollectionDefined(DnsResolution)) { - writer.WritePropertyName("resourceLock"u8); + writer.WritePropertyName("dnsResolution"u8); writer.WriteStartObject(); - foreach (var item in ResourceLock) + foreach (var item in DnsResolution) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -75,11 +75,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(DnsResolution)) + if (Optional.IsCollectionDefined(KeyVault)) { - writer.WritePropertyName("dnsResolution"u8); + writer.WritePropertyName("keyVault"u8); writer.WriteStartObject(); - foreach (var item in DnsResolution) + foreach (var item in KeyVault) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -95,11 +95,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(StorageAccount)) + if (Optional.IsCollectionDefined(Nsg)) { - writer.WritePropertyName("storageAccount"u8); + writer.WritePropertyName("nsg"u8); writer.WriteStartObject(); - foreach (var item in StorageAccount) + foreach (var item in Nsg) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -115,11 +115,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(KeyVault)) + if (Optional.IsCollectionDefined(Others)) { - writer.WritePropertyName("keyVault"u8); + writer.WritePropertyName("others"u8); writer.WriteStartObject(); - foreach (var item in KeyVault) + foreach (var item in Others) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -135,11 +135,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(ContainerRegistry)) + if (Optional.IsCollectionDefined(ResourceLock)) { - writer.WritePropertyName("containerRegistry"u8); + writer.WritePropertyName("resourceLock"u8); writer.WriteStartObject(); - foreach (var item in ContainerRegistry) + foreach (var item in ResourceLock) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -155,11 +155,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(ApplicationInsights)) + if (Optional.IsCollectionDefined(StorageAccount)) { - writer.WritePropertyName("applicationInsights"u8); + writer.WritePropertyName("storageAccount"u8); writer.WriteStartObject(); - foreach (var item in ApplicationInsights) + foreach (var item in StorageAccount) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -175,11 +175,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(Others)) + if (Optional.IsCollectionDefined(Udr)) { - writer.WritePropertyName("others"u8); + writer.WritePropertyName("udr"u8); writer.WriteStartObject(); - foreach (var item in Others) + foreach (var item in Udr) { writer.WritePropertyName(item.Key); if (item.Value == null) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs index ce2c9bc66abe6..5efec1886d33d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs @@ -17,19 +17,19 @@ public partial class MachineLearningWorkspaceDiagnoseProperties /// Initializes a new instance of MachineLearningWorkspaceDiagnoseProperties. public MachineLearningWorkspaceDiagnoseProperties() { - Udr = new ChangeTrackingDictionary(); - Nsg = new ChangeTrackingDictionary(); - ResourceLock = new ChangeTrackingDictionary(); + ApplicationInsights = new ChangeTrackingDictionary(); + ContainerRegistry = new ChangeTrackingDictionary(); DnsResolution = new ChangeTrackingDictionary(); - StorageAccount = new ChangeTrackingDictionary(); KeyVault = new ChangeTrackingDictionary(); - ContainerRegistry = new ChangeTrackingDictionary(); - ApplicationInsights = new ChangeTrackingDictionary(); + Nsg = new ChangeTrackingDictionary(); Others = new ChangeTrackingDictionary(); + ResourceLock = new ChangeTrackingDictionary(); + StorageAccount = new ChangeTrackingDictionary(); + Udr = new ChangeTrackingDictionary(); } /// - /// Setting for diagnosing user defined routing + /// Setting for diagnosing dependent application insights /// /// To assign an object to the value of this property use . /// @@ -58,9 +58,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary Udr { get; } + public IDictionary ApplicationInsights { get; } /// - /// Setting for diagnosing network security group + /// Setting for diagnosing dependent container registry /// /// To assign an object to the value of this property use . /// @@ -89,9 +89,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary Nsg { get; } + public IDictionary ContainerRegistry { get; } /// - /// Setting for diagnosing resource lock + /// Setting for diagnosing dns resolution /// /// To assign an object to the value of this property use . /// @@ -120,9 +120,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary ResourceLock { get; } + public IDictionary DnsResolution { get; } /// - /// Setting for diagnosing dns resolution + /// Setting for diagnosing dependent key vault /// /// To assign an object to the value of this property use . /// @@ -151,9 +151,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary DnsResolution { get; } + public IDictionary KeyVault { get; } /// - /// Setting for diagnosing dependent storage account + /// Setting for diagnosing network security group /// /// To assign an object to the value of this property use . /// @@ -182,9 +182,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary StorageAccount { get; } + public IDictionary Nsg { get; } /// - /// Setting for diagnosing dependent key vault + /// Setting for diagnosing unclassified category of problems /// /// To assign an object to the value of this property use . /// @@ -213,9 +213,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary KeyVault { get; } + public IDictionary Others { get; } /// - /// Setting for diagnosing dependent container registry + /// Setting for diagnosing resource lock /// /// To assign an object to the value of this property use . /// @@ -244,9 +244,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary ContainerRegistry { get; } + public IDictionary ResourceLock { get; } /// - /// Setting for diagnosing dependent application insights + /// Setting for diagnosing dependent storage account /// /// To assign an object to the value of this property use . /// @@ -275,9 +275,9 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary ApplicationInsights { get; } + public IDictionary StorageAccount { get; } /// - /// Setting for diagnosing unclassified category of problems + /// Setting for diagnosing user defined routing /// /// To assign an object to the value of this property use . /// @@ -306,6 +306,6 @@ public MachineLearningWorkspaceDiagnoseProperties() /// /// /// - public IDictionary Others { get; } + public IDictionary Udr { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs index 1a2856907a503..0505f63e8df27 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs @@ -18,23 +18,13 @@ internal static MachineLearningWorkspaceGetKeysResult DeserializeMachineLearning { return null; } - Optional userStorageKey = default; - Optional userStorageResourceId = default; Optional appInsightsInstrumentationKey = default; Optional containerRegistryCredentials = default; Optional notebookAccessKeys = default; + Optional userStorageArmId = default; + Optional userStorageKey = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("userStorageKey"u8)) - { - userStorageKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("userStorageResourceId"u8)) - { - userStorageResourceId = property.Value.GetString(); - continue; - } if (property.NameEquals("appInsightsInstrumentationKey"u8)) { appInsightsInstrumentationKey = property.Value.GetString(); @@ -58,8 +48,18 @@ internal static MachineLearningWorkspaceGetKeysResult DeserializeMachineLearning notebookAccessKeys = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(property.Value); continue; } + if (property.NameEquals("userStorageArmId"u8)) + { + userStorageArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userStorageKey"u8)) + { + userStorageKey = property.Value.GetString(); + continue; + } } - return new MachineLearningWorkspaceGetKeysResult(userStorageKey.Value, userStorageResourceId.Value, appInsightsInstrumentationKey.Value, containerRegistryCredentials.Value, notebookAccessKeys.Value); + return new MachineLearningWorkspaceGetKeysResult(appInsightsInstrumentationKey.Value, containerRegistryCredentials.Value, notebookAccessKeys.Value, userStorageArmId.Value, userStorageKey.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs index ac771dcad1dcd..8c046f2635283 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs @@ -16,29 +16,29 @@ internal MachineLearningWorkspaceGetKeysResult() } /// Initializes a new instance of MachineLearningWorkspaceGetKeysResult. - /// - /// - /// + /// The access key of the workspace app insights. /// /// - internal MachineLearningWorkspaceGetKeysResult(string userStorageKey, string userStorageResourceId, string appInsightsInstrumentationKey, MachineLearningContainerRegistryCredentials containerRegistryCredentials, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys) + /// The arm Id key of the workspace storage. + /// The access key of the workspace storage. + internal MachineLearningWorkspaceGetKeysResult(string appInsightsInstrumentationKey, MachineLearningContainerRegistryCredentials containerRegistryCredentials, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys, string userStorageResourceId, string userStorageKey) { - UserStorageKey = userStorageKey; - UserStorageResourceId = userStorageResourceId; AppInsightsInstrumentationKey = appInsightsInstrumentationKey; ContainerRegistryCredentials = containerRegistryCredentials; NotebookAccessKeys = notebookAccessKeys; + UserStorageResourceId = userStorageResourceId; + UserStorageKey = userStorageKey; } - /// Gets the user storage key. - public string UserStorageKey { get; } - /// Gets the user storage resource id. - public string UserStorageResourceId { get; } - /// Gets the app insights instrumentation key. + /// The access key of the workspace app insights. public string AppInsightsInstrumentationKey { get; } /// Gets the container registry credentials. public MachineLearningContainerRegistryCredentials ContainerRegistryCredentials { get; } /// Gets the notebook access keys. public MachineLearningWorkspaceGetNotebookKeysResult NotebookAccessKeys { get; } + /// The arm Id key of the workspace storage. + public string UserStorageResourceId { get; } + /// The access key of the workspace storage. + public string UserStorageKey { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs index 97637b3ab29e0..4743f37b83dc8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs @@ -16,17 +16,17 @@ internal MachineLearningWorkspaceGetNotebookKeysResult() } /// Initializes a new instance of MachineLearningWorkspaceGetNotebookKeysResult. - /// - /// + /// The primary access key of the Notebook. + /// The secondary access key of the Notebook. internal MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey, string secondaryAccessKey) { PrimaryAccessKey = primaryAccessKey; SecondaryAccessKey = secondaryAccessKey; } - /// Gets the primary access key. + /// The primary access key of the Notebook. public string PrimaryAccessKey { get; } - /// Gets the secondary access key. + /// The secondary access key of the Notebook. public string SecondaryAccessKey { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs index bdea0928ba8f7..62686f3525429 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs @@ -16,13 +16,13 @@ internal MachineLearningWorkspaceGetStorageAccountKeysResult() } /// Initializes a new instance of MachineLearningWorkspaceGetStorageAccountKeysResult. - /// + /// The access key of the storage. internal MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey) { UserStorageKey = userStorageKey; } - /// Gets the user storage key. + /// The access key of the storage. public string UserStorageKey { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs index e8bb183e7c0dc..0f5697d64c192 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs @@ -18,48 +18,43 @@ internal static MachineLearningWorkspaceNotebookAccessTokenResult DeserializeMac { return null; } - Optional notebookResourceId = default; - Optional hostName = default; - Optional publicDns = default; Optional accessToken = default; - Optional tokenType = default; Optional expiresIn = default; + Optional hostName = default; + Optional notebookResourceId = default; + Optional publicDns = default; Optional refreshToken = default; Optional scope = default; + Optional tokenType = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("notebookResourceId"u8)) - { - notebookResourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("hostName"u8)) + if (property.NameEquals("accessToken"u8)) { - hostName = property.Value.GetString(); + accessToken = property.Value.GetString(); continue; } - if (property.NameEquals("publicDns"u8)) + if (property.NameEquals("expiresIn"u8)) { - publicDns = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresIn = property.Value.GetInt32(); continue; } - if (property.NameEquals("accessToken"u8)) + if (property.NameEquals("hostName"u8)) { - accessToken = property.Value.GetString(); + hostName = property.Value.GetString(); continue; } - if (property.NameEquals("tokenType"u8)) + if (property.NameEquals("notebookResourceId"u8)) { - tokenType = property.Value.GetString(); + notebookResourceId = property.Value.GetString(); continue; } - if (property.NameEquals("expiresIn"u8)) + if (property.NameEquals("publicDns"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expiresIn = property.Value.GetInt32(); + publicDns = property.Value.GetString(); continue; } if (property.NameEquals("refreshToken"u8)) @@ -72,8 +67,13 @@ internal static MachineLearningWorkspaceNotebookAccessTokenResult DeserializeMac scope = property.Value.GetString(); continue; } + if (property.NameEquals("tokenType"u8)) + { + tokenType = property.Value.GetString(); + continue; + } } - return new MachineLearningWorkspaceNotebookAccessTokenResult(notebookResourceId.Value, hostName.Value, publicDns.Value, accessToken.Value, tokenType.Value, Optional.ToNullable(expiresIn), refreshToken.Value, scope.Value); + return new MachineLearningWorkspaceNotebookAccessTokenResult(accessToken.Value, Optional.ToNullable(expiresIn), hostName.Value, notebookResourceId.Value, publicDns.Value, refreshToken.Value, scope.Value, tokenType.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs index 5f3c95cb60986..3d4134bf9174d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs @@ -16,41 +16,41 @@ internal MachineLearningWorkspaceNotebookAccessTokenResult() } /// Initializes a new instance of MachineLearningWorkspaceNotebookAccessTokenResult. - /// - /// - /// /// - /// /// + /// + /// + /// /// /// - internal MachineLearningWorkspaceNotebookAccessTokenResult(string notebookResourceId, string hostName, string publicDns, string accessToken, string tokenType, int? expiresIn, string refreshToken, string scope) + /// + internal MachineLearningWorkspaceNotebookAccessTokenResult(string accessToken, int? expiresIn, string hostName, string notebookResourceId, string publicDns, string refreshToken, string scope, string tokenType) { - NotebookResourceId = notebookResourceId; - HostName = hostName; - PublicDns = publicDns; AccessToken = accessToken; - TokenType = tokenType; ExpiresIn = expiresIn; + HostName = hostName; + NotebookResourceId = notebookResourceId; + PublicDns = publicDns; RefreshToken = refreshToken; Scope = scope; + TokenType = tokenType; } - /// Gets the notebook resource id. - public string NotebookResourceId { get; } - /// Gets the host name. - public string HostName { get; } - /// Gets the public dns. - public string PublicDns { get; } /// Gets the access token. public string AccessToken { get; } - /// Gets the token type. - public string TokenType { get; } /// Gets the expires in. public int? ExpiresIn { get; } + /// Gets the host name. + public string HostName { get; } + /// Gets the notebook resource id. + public string NotebookResourceId { get; } + /// Gets the public dns. + public string PublicDns { get; } /// Gets the refresh token. public string RefreshToken { get; } /// Gets the scope. public string Scope { get; } + /// Gets the token type. + public string TokenType { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs index 308d53e2bc915..b886215a796f7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs @@ -16,6 +16,17 @@ public partial class MachineLearningWorkspacePatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -27,24 +38,38 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsDefined(Sku)) + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ApplicationInsights)) { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku); + writer.WritePropertyName("applicationInsights"u8); + writer.WriteStringValue(ApplicationInsights); } - if (Optional.IsDefined(Identity)) + if (Optional.IsDefined(ContainerRegistry)) { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); + writer.WritePropertyName("containerRegistry"u8); + writer.WriteStringValue(ContainerRegistry); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsDefined(EnableDataIsolation)) + { + writer.WritePropertyName("enableDataIsolation"u8); + writer.WriteBooleanValue(EnableDataIsolation.Value); + } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption); + } + if (Optional.IsDefined(FeatureStoreSettings)) + { + writer.WritePropertyName("featureStoreSettings"u8); + writer.WriteObjectValue(FeatureStoreSettings); + } if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -55,30 +80,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("imageBuildCompute"u8); writer.WriteStringValue(ImageBuildCompute); } - if (Optional.IsDefined(ServiceManagedResourcesSettings)) + if (Optional.IsDefined(ManagedNetwork)) { - writer.WritePropertyName("serviceManagedResourcesSettings"u8); - writer.WriteObjectValue(ServiceManagedResourcesSettings); + writer.WritePropertyName("managedNetwork"u8); + writer.WriteObjectValue(ManagedNetwork); } if (Optional.IsDefined(PrimaryUserAssignedIdentity)) { writer.WritePropertyName("primaryUserAssignedIdentity"u8); writer.WriteStringValue(PrimaryUserAssignedIdentity); } - if (Optional.IsDefined(PublicNetworkAccess)) + if (Optional.IsDefined(PublicNetworkAccessType)) { writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + writer.WriteStringValue(PublicNetworkAccessType.Value.ToString()); } - if (Optional.IsDefined(ApplicationInsights)) + if (Optional.IsDefined(ServiceManagedResourcesSettings)) { - writer.WritePropertyName("applicationInsights"u8); - writer.WriteStringValue(ApplicationInsights); + writer.WritePropertyName("serviceManagedResourcesSettings"u8); + writer.WriteObjectValue(ServiceManagedResourcesSettings); } - if (Optional.IsDefined(ContainerRegistry)) + if (Optional.IsDefined(SoftDeleteRetentionInDays)) { - writer.WritePropertyName("containerRegistry"u8); - writer.WriteStringValue(ContainerRegistry); + writer.WritePropertyName("softDeleteRetentionInDays"u8); + writer.WriteNumberValue(SoftDeleteRetentionInDays.Value); + } + if (Optional.IsDefined(V1LegacyMode)) + { + writer.WritePropertyName("v1LegacyMode"u8); + writer.WriteBooleanValue(V1LegacyMode.Value); } writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs index 23edc0aff4a1f..de0d518609a67 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs @@ -20,21 +20,44 @@ public MachineLearningWorkspacePatch() Tags = new ChangeTrackingDictionary(); } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } + /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + public MachineLearningSku Sku { get; set; } /// The resource tags for the machine learning workspace. public IDictionary Tags { get; } - /// The sku of the workspace. - public MachineLearningSku Sku { get; set; } - /// The identity of the resource. - public ManagedServiceIdentity Identity { get; set; } + /// ARM id of the application insights associated with this workspace. + public string ApplicationInsights { get; set; } + /// ARM id of the container registry associated with this workspace. + public string ContainerRegistry { get; set; } /// The description of this workspace. public string Description { get; set; } - /// The friendly name for this workspace. + /// Gets or sets the enable data isolation. + public bool? EnableDataIsolation { get; set; } + /// Gets or sets the encryption. + internal EncryptionUpdateProperties Encryption { get; set; } + /// Gets or sets the key identifier. + public string KeyIdentifier + { + get => Encryption is null ? default : Encryption.KeyIdentifier; + set => Encryption = new EncryptionUpdateProperties(value); + } + + /// Settings for feature store type workspace. + public FeatureStoreSettings FeatureStoreSettings { get; set; } + /// The friendly name for this workspace. This name in mutable. public string FriendlyName { get; set; } /// The compute name for image build. public string ImageBuildCompute { get; set; } + /// Managed Network settings for a machine learning workspace. + public ManagedNetworkSettings ManagedNetwork { get; set; } + /// The user assigned identity resource id that represents the workspace identity. + public string PrimaryUserAssignedIdentity { get; set; } + /// Whether requests from Public Network are allowed. + public MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get; set; } /// The service managed resource settings. internal ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } - /// The throughput of the collections in cosmosdb database. + /// Gets or sets the cosmos db collections throughput. public int? CosmosDbCollectionsThroughput { get => ServiceManagedResourcesSettings is null ? default : ServiceManagedResourcesSettings.CosmosDbCollectionsThroughput; @@ -46,13 +69,9 @@ public int? CosmosDbCollectionsThroughput } } - /// The user assigned identity resource id that represents the workspace identity. - public string PrimaryUserAssignedIdentity { get; set; } - /// Whether requests from Public Network are allowed. - public MachineLearningPublicNetworkAccess? PublicNetworkAccess { get; set; } - /// ARM id of the application insights associated with this workspace. - public string ApplicationInsights { get; set; } - /// ARM id of the container registry associated with this workspace. - public string ContainerRegistry { get; set; } + /// Retention time in days after workspace get soft deleted. + public int? SoftDeleteRetentionInDays { get; set; } + /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + public bool? V1LegacyMode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.Serialization.cs new file mode 100644 index 0000000000000..11c4df8874256 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ManagedComputeIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + writer.WritePropertyName("computeIdentityType"u8); + writer.WriteStringValue(ComputeIdentityType.ToString()); + writer.WriteEndObject(); + } + + internal static ManagedComputeIdentity DeserializeManagedComputeIdentity(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional identity = default; + MonitorComputeIdentityType computeIdentityType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (property.NameEquals("computeIdentityType"u8)) + { + computeIdentityType = new MonitorComputeIdentityType(property.Value.GetString()); + continue; + } + } + return new ManagedComputeIdentity(computeIdentityType, identity); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.cs new file mode 100644 index 0000000000000..1cb4caba91c23 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedComputeIdentity.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Managed compute identity definition. + public partial class ManagedComputeIdentity : MonitorComputeIdentityBase + { + /// Initializes a new instance of ManagedComputeIdentity. + public ManagedComputeIdentity() + { + ComputeIdentityType = MonitorComputeIdentityType.ManagedIdentity; + } + + /// Initializes a new instance of ManagedComputeIdentity. + /// [Required] Monitor compute identity type enum. + /// Managed service identity (system assigned and/or user assigned identities). + internal ManagedComputeIdentity(MonitorComputeIdentityType computeIdentityType, ManagedServiceIdentity identity) : base(computeIdentityType) + { + Identity = identity; + ComputeIdentityType = computeIdentityType; + } + + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.Serialization.cs new file mode 100644 index 0000000000000..e75a26dabfbbd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ManagedNetworkProvisionContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IncludeSpark)) + { + writer.WritePropertyName("includeSpark"u8); + writer.WriteBooleanValue(IncludeSpark.Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.cs new file mode 100644 index 0000000000000..80dd872794184 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionContent.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Managed Network Provisioning options for managed network of a machine learning workspace. + public partial class ManagedNetworkProvisionContent + { + /// Initializes a new instance of ManagedNetworkProvisionContent. + public ManagedNetworkProvisionContent() + { + } + + /// Gets or sets the include spark. + public bool? IncludeSpark { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.Serialization.cs new file mode 100644 index 0000000000000..fba4c4402aa0e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ManagedNetworkProvisionStatus : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SparkReady)) + { + writer.WritePropertyName("sparkReady"u8); + writer.WriteBooleanValue(SparkReady.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static ManagedNetworkProvisionStatus DeserializeManagedNetworkProvisionStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional sparkReady = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sparkReady"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkReady = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ManagedNetworkStatus(property.Value.GetString()); + continue; + } + } + return new ManagedNetworkProvisionStatus(Optional.ToNullable(sparkReady), Optional.ToNullable(status)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.cs new file mode 100644 index 0000000000000..4eb73c776deaf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkProvisionStatus.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Status of the Provisioning for the managed network of a machine learning workspace. + public partial class ManagedNetworkProvisionStatus + { + /// Initializes a new instance of ManagedNetworkProvisionStatus. + public ManagedNetworkProvisionStatus() + { + } + + /// Initializes a new instance of ManagedNetworkProvisionStatus. + /// + /// Status for the managed network of a machine learning workspace. + internal ManagedNetworkProvisionStatus(bool? sparkReady, ManagedNetworkStatus? status) + { + SparkReady = sparkReady; + Status = status; + } + + /// Gets or sets the spark ready. + public bool? SparkReady { get; set; } + /// Status for the managed network of a machine learning workspace. + public ManagedNetworkStatus? Status { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs new file mode 100644 index 0000000000000..bc690862c0d74 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ManagedNetworkSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsolationMode)) + { + writer.WritePropertyName("isolationMode"u8); + writer.WriteStringValue(IsolationMode.Value.ToString()); + } + if (Optional.IsCollectionDefined(OutboundRules)) + { + if (OutboundRules != null) + { + writer.WritePropertyName("outboundRules"u8); + writer.WriteStartObject(); + foreach (var item in OutboundRules) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("outboundRules"); + } + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status); + } + writer.WriteEndObject(); + } + + internal static ManagedNetworkSettings DeserializeManagedNetworkSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional isolationMode = default; + Optional networkId = default; + Optional> outboundRules = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isolationMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationMode = new IsolationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("networkId"u8)) + { + networkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("outboundRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outboundRules = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningOutboundRule.DeserializeMachineLearningOutboundRule(property0.Value)); + } + outboundRules = dictionary; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = ManagedNetworkProvisionStatus.DeserializeManagedNetworkProvisionStatus(property.Value); + continue; + } + } + return new ManagedNetworkSettings(Optional.ToNullable(isolationMode), networkId.Value, Optional.ToDictionary(outboundRules), status.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs new file mode 100644 index 0000000000000..7ba817e3499cd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Managed Network settings for a machine learning workspace. + public partial class ManagedNetworkSettings + { + /// Initializes a new instance of ManagedNetworkSettings. + public ManagedNetworkSettings() + { + OutboundRules = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ManagedNetworkSettings. + /// Isolation mode for the managed network of a machine learning workspace. + /// + /// + /// Dictionary of <OutboundRule> + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Status of the Provisioning for the managed network of a machine learning workspace. + internal ManagedNetworkSettings(IsolationMode? isolationMode, string networkId, IDictionary outboundRules, ManagedNetworkProvisionStatus status) + { + IsolationMode = isolationMode; + NetworkId = networkId; + OutboundRules = outboundRules; + Status = status; + } + + /// Isolation mode for the managed network of a machine learning workspace. + public IsolationMode? IsolationMode { get; set; } + /// Gets the network id. + public string NetworkId { get; } + /// + /// Dictionary of <OutboundRule> + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public IDictionary OutboundRules { get; set; } + /// Status of the Provisioning for the managed network of a machine learning workspace. + public ManagedNetworkProvisionStatus Status { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkStatus.cs new file mode 100644 index 0000000000000..0ddfa482a0446 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Status for the managed network of a machine learning workspace. + public readonly partial struct ManagedNetworkStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedNetworkStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InactiveValue = "Inactive"; + private const string ActiveValue = "Active"; + + /// Inactive. + public static ManagedNetworkStatus Inactive { get; } = new ManagedNetworkStatus(InactiveValue); + /// Active. + public static ManagedNetworkStatus Active { get; } = new ManagedNetworkStatus(ActiveValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedNetworkStatus left, ManagedNetworkStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedNetworkStatus left, ManagedNetworkStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ManagedNetworkStatus(string value) => new ManagedNetworkStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedNetworkStatus other && Equals(other); + /// + public bool Equals(ManagedNetworkStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.Serialization.cs new file mode 100644 index 0000000000000..6d0e6940ff5a1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class MaterializationComputeResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + writer.WriteEndObject(); + } + + internal static MaterializationComputeResource DeserializeMaterializationComputeResource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + } + return new MaterializationComputeResource(instanceType.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.cs new file mode 100644 index 0000000000000..73f5a582742e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationComputeResource.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Dto object representing compute resource. + internal partial class MaterializationComputeResource + { + /// Initializes a new instance of MaterializationComputeResource. + public MaterializationComputeResource() + { + } + + /// Initializes a new instance of MaterializationComputeResource. + /// Specifies the instance type. + internal MaterializationComputeResource(string instanceType) + { + InstanceType = instanceType; + } + + /// Specifies the instance type. + public string InstanceType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs new file mode 100644 index 0000000000000..d8139b398c3cb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MaterializationSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Notification)) + { + if (Notification != null) + { + writer.WritePropertyName("notification"u8); + writer.WriteObjectValue(Notification); + } + else + { + writer.WriteNull("notification"); + } + } + if (Optional.IsDefined(Resource)) + { + if (Resource != null) + { + writer.WritePropertyName("resource"u8); + writer.WriteObjectValue(Resource); + } + else + { + writer.WriteNull("resource"); + } + } + if (Optional.IsDefined(Schedule)) + { + if (Schedule != null) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule); + } + else + { + writer.WriteNull("schedule"); + } + } + if (Optional.IsCollectionDefined(SparkConfiguration)) + { + if (SparkConfiguration != null) + { + writer.WritePropertyName("sparkConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SparkConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("sparkConfiguration"); + } + } + if (Optional.IsDefined(StoreType)) + { + writer.WritePropertyName("storeType"u8); + writer.WriteStringValue(StoreType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MaterializationSettings DeserializeMaterializationSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional notification = default; + Optional resource = default; + Optional schedule = default; + Optional> sparkConfiguration = default; + Optional storeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notification = null; + continue; + } + notification = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("resource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resource = null; + continue; + } + resource = MaterializationComputeResource.DeserializeMaterializationComputeResource(property.Value); + continue; + } + if (property.NameEquals("schedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + schedule = null; + continue; + } + schedule = MachineLearningRecurrenceTrigger.DeserializeMachineLearningRecurrenceTrigger(property.Value); + continue; + } + if (property.NameEquals("sparkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sparkConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + sparkConfiguration = dictionary; + continue; + } + if (property.NameEquals("storeType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storeType = new MaterializationStoreType(property.Value.GetString()); + continue; + } + } + return new MaterializationSettings(notification.Value, resource.Value, schedule.Value, Optional.ToDictionary(sparkConfiguration), Optional.ToNullable(storeType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs new file mode 100644 index 0000000000000..da07f37563df9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MaterializationSettings. + public partial class MaterializationSettings + { + /// Initializes a new instance of MaterializationSettings. + public MaterializationSettings() + { + SparkConfiguration = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MaterializationSettings. + /// Specifies the notification details. + /// Specifies the compute resource settings. + /// Specifies the schedule details. + /// Specifies the spark compute settings. + /// Specifies the stores to which materialization should happen. + internal MaterializationSettings(NotificationSetting notification, MaterializationComputeResource resource, MachineLearningRecurrenceTrigger schedule, IDictionary sparkConfiguration, MaterializationStoreType? storeType) + { + Notification = notification; + Resource = resource; + Schedule = schedule; + SparkConfiguration = sparkConfiguration; + StoreType = storeType; + } + + /// Specifies the notification details. + public NotificationSetting Notification { get; set; } + /// Specifies the compute resource settings. + internal MaterializationComputeResource Resource { get; set; } + /// Specifies the instance type. + public string ResourceInstanceType + { + get => Resource is null ? default : Resource.InstanceType; + set + { + if (Resource is null) + Resource = new MaterializationComputeResource(); + Resource.InstanceType = value; + } + } + + /// Specifies the schedule details. + public MachineLearningRecurrenceTrigger Schedule { get; set; } + /// Specifies the spark compute settings. + public IDictionary SparkConfiguration { get; set; } + /// Specifies the stores to which materialization should happen. + public MaterializationStoreType? StoreType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationStoreType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationStoreType.cs new file mode 100644 index 0000000000000..d2b2e2734f227 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationStoreType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MaterializationStoreType. + public readonly partial struct MaterializationStoreType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MaterializationStoreType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string OnlineValue = "Online"; + private const string OfflineValue = "Offline"; + private const string OnlineAndOfflineValue = "OnlineAndOffline"; + + /// None. + public static MaterializationStoreType None { get; } = new MaterializationStoreType(NoneValue); + /// Online. + public static MaterializationStoreType Online { get; } = new MaterializationStoreType(OnlineValue); + /// Offline. + public static MaterializationStoreType Offline { get; } = new MaterializationStoreType(OfflineValue); + /// OnlineAndOffline. + public static MaterializationStoreType OnlineAndOffline { get; } = new MaterializationStoreType(OnlineAndOfflineValue); + /// Determines if two values are the same. + public static bool operator ==(MaterializationStoreType left, MaterializationStoreType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MaterializationStoreType left, MaterializationStoreType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MaterializationStoreType(string value) => new MaterializationStoreType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MaterializationStoreType other && Equals(other); + /// + public bool Equals(MaterializationStoreType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MediaType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MediaType.cs new file mode 100644 index 0000000000000..f7345938615c0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MediaType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Media type of data asset. + internal readonly partial struct MediaType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MediaType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ImageValue = "Image"; + private const string TextValue = "Text"; + + /// Image. + public static MediaType Image { get; } = new MediaType(ImageValue); + /// Text. + public static MediaType Text { get; } = new MediaType(TextValue); + /// Determines if two values are the same. + public static bool operator ==(MediaType left, MediaType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MediaType left, MediaType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MediaType(string value) => new MediaType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MediaType other && Equals(other); + /// + public bool Equals(MediaType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.Serialization.cs new file mode 100644 index 0000000000000..9fca632b48258 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ModelConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(MountPath)) + { + if (MountPath != null) + { + writer.WritePropertyName("mountPath"u8); + writer.WriteStringValue(MountPath); + } + else + { + writer.WriteNull("mountPath"); + } + } + writer.WriteEndObject(); + } + + internal static ModelConfiguration DeserializeModelConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional mode = default; + Optional mountPath = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new PackageInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountPath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + mountPath = null; + continue; + } + mountPath = property.Value.GetString(); + continue; + } + } + return new ModelConfiguration(Optional.ToNullable(mode), mountPath.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.cs new file mode 100644 index 0000000000000..1d33bd9537e66 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Model configuration options. + public partial class ModelConfiguration + { + /// Initializes a new instance of ModelConfiguration. + public ModelConfiguration() + { + } + + /// Initializes a new instance of ModelConfiguration. + /// Input delivery mode for the model. + /// Relative mounting path of the model in the target image. + internal ModelConfiguration(PackageInputDeliveryMode? mode, string mountPath) + { + Mode = mode; + MountPath = mountPath; + } + + /// Input delivery mode for the model. + public PackageInputDeliveryMode? Mode { get; set; } + /// Relative mounting path of the model in the target image. + public string MountPath { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.Serialization.cs new file mode 100644 index 0000000000000..47050f6f2ad14 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ModelPackageContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BaseEnvironmentSource)) + { + if (BaseEnvironmentSource != null) + { + writer.WritePropertyName("baseEnvironmentSource"u8); + writer.WriteObjectValue(BaseEnvironmentSource); + } + else + { + writer.WriteNull("baseEnvironmentSource"); + } + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + writer.WritePropertyName("inferencingServer"u8); + writer.WriteObjectValue(InferencingServer); + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs != null) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("inputs"); + } + } + if (Optional.IsDefined(ModelConfiguration)) + { + if (ModelConfiguration != null) + { + writer.WritePropertyName("modelConfiguration"u8); + writer.WriteObjectValue(ModelConfiguration); + } + else + { + writer.WriteNull("modelConfiguration"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WritePropertyName("targetEnvironmentId"u8); + writer.WriteStringValue(TargetEnvironmentId); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.cs new file mode 100644 index 0000000000000..bd30ae5d04b5a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageContent.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Model package operation request properties. + public partial class ModelPackageContent + { + /// Initializes a new instance of ModelPackageContent. + /// + /// [Required] Inferencing server configurations. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// [Required] Arm ID of the target environment to be created by package operation. + /// or is null. + public ModelPackageContent(InferencingServer inferencingServer, string targetEnvironmentId) + { + Argument.AssertNotNull(inferencingServer, nameof(inferencingServer)); + Argument.AssertNotNull(targetEnvironmentId, nameof(targetEnvironmentId)); + + EnvironmentVariables = new ChangeTrackingDictionary(); + InferencingServer = inferencingServer; + Inputs = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + TargetEnvironmentId = targetEnvironmentId; + } + + /// + /// Base environment to start with. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public BaseEnvironmentSource BaseEnvironmentSource { get; set; } + /// Collection of environment variables. + public IDictionary EnvironmentVariables { get; set; } + /// + /// [Required] Inferencing server configurations. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + public InferencingServer InferencingServer { get; } + /// Collection of inputs. + public IList Inputs { get; set; } + /// Model configuration including the mount mode. + public ModelConfiguration ModelConfiguration { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; set; } + /// [Required] Arm ID of the target environment to be created by package operation. + public string TargetEnvironmentId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.Serialization.cs new file mode 100644 index 0000000000000..2ce1b9141cef2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.Serialization.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ModelPackageInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("inputType"u8); + writer.WriteStringValue(InputType.ToString()); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(MountPath)) + { + if (MountPath != null) + { + writer.WritePropertyName("mountPath"u8); + writer.WriteStringValue(MountPath); + } + else + { + writer.WriteNull("mountPath"); + } + } + writer.WritePropertyName("path"u8); + writer.WriteObjectValue(Path); + writer.WriteEndObject(); + } + + internal static ModelPackageInput DeserializeModelPackageInput(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PackageInputType inputType = default; + Optional mode = default; + Optional mountPath = default; + PackageInputPathBase path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputType"u8)) + { + inputType = new PackageInputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new PackageInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountPath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + mountPath = null; + continue; + } + mountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("path"u8)) + { + path = PackageInputPathBase.DeserializePackageInputPathBase(property.Value); + continue; + } + } + return new ModelPackageInput(inputType, Optional.ToNullable(mode), mountPath.Value, path); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.cs new file mode 100644 index 0000000000000..52c9ae847ec3d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageInput.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Model package input options. + public partial class ModelPackageInput + { + /// Initializes a new instance of ModelPackageInput. + /// [Required] Type of the input included in the target image. + /// + /// [Required] Location of the input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + public ModelPackageInput(PackageInputType inputType, PackageInputPathBase path) + { + Argument.AssertNotNull(path, nameof(path)); + + InputType = inputType; + Path = path; + } + + /// Initializes a new instance of ModelPackageInput. + /// [Required] Type of the input included in the target image. + /// Input delivery mode of the input. + /// Relative mount path of the input in the target image. + /// + /// [Required] Location of the input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal ModelPackageInput(PackageInputType inputType, PackageInputDeliveryMode? mode, string mountPath, PackageInputPathBase path) + { + InputType = inputType; + Mode = mode; + MountPath = mountPath; + Path = path; + } + + /// [Required] Type of the input included in the target image. + public PackageInputType InputType { get; set; } + /// Input delivery mode of the input. + public PackageInputDeliveryMode? Mode { get; set; } + /// Relative mount path of the input in the target image. + public string MountPath { get; set; } + /// + /// [Required] Location of the input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public PackageInputPathBase Path { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.Serialization.cs new file mode 100644 index 0000000000000..2277dc856f513 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ModelPackageResult + { + internal static ModelPackageResult DeserializeModelPackageResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional baseEnvironmentSource = default; + Optional buildId = default; + Optional buildState = default; + Optional> environmentVariables = default; + Optional inferencingServer = default; + Optional> inputs = default; + Optional logUrl = default; + Optional modelConfiguration = default; + Optional> tags = default; + Optional targetEnvironmentId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseEnvironmentSource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + baseEnvironmentSource = null; + continue; + } + baseEnvironmentSource = BaseEnvironmentSource.DeserializeBaseEnvironmentSource(property.Value); + continue; + } + if (property.NameEquals("buildId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + buildId = null; + continue; + } + buildId = property.Value.GetString(); + continue; + } + if (property.NameEquals("buildState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + buildState = new PackageBuildState(property.Value.GetString()); + continue; + } + if (property.NameEquals("environmentVariables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("inferencingServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inferencingServer = null; + continue; + } + inferencingServer = InferencingServer.DeserializeInferencingServer(property.Value); + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inputs = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ModelPackageInput.DeserializeModelPackageInput(item)); + } + inputs = array; + continue; + } + if (property.NameEquals("logUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + logUrl = null; + continue; + } + logUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("modelConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelConfiguration = null; + continue; + } + modelConfiguration = ModelConfiguration.DeserializeModelConfiguration(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("targetEnvironmentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + targetEnvironmentId = null; + continue; + } + targetEnvironmentId = property.Value.GetString(); + continue; + } + } + return new ModelPackageResult(baseEnvironmentSource.Value, buildId.Value, Optional.ToNullable(buildState), Optional.ToDictionary(environmentVariables), inferencingServer.Value, Optional.ToList(inputs), logUrl.Value, modelConfiguration.Value, Optional.ToDictionary(tags), targetEnvironmentId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.cs new file mode 100644 index 0000000000000..3379a3ec82925 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPackageResult.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Package response returned after async package operation completes successfully. + public partial class ModelPackageResult + { + /// Initializes a new instance of ModelPackageResult. + internal ModelPackageResult() + { + EnvironmentVariables = new ChangeTrackingDictionary(); + Inputs = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ModelPackageResult. + /// + /// Base environment to start with. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Build id of the image build operation. + /// Build state of the image build operation. + /// Collection of environment variables. + /// + /// Inferencing server configurations. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// Collection of inputs. + /// Log url of the image build operation. + /// Model configuration including the mount mode. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Asset ID of the target environment created by package operation. + internal ModelPackageResult(BaseEnvironmentSource baseEnvironmentSource, string buildId, PackageBuildState? buildState, IReadOnlyDictionary environmentVariables, InferencingServer inferencingServer, IReadOnlyList inputs, Uri logUri, ModelConfiguration modelConfiguration, IReadOnlyDictionary tags, string targetEnvironmentId) + { + BaseEnvironmentSource = baseEnvironmentSource; + BuildId = buildId; + BuildState = buildState; + EnvironmentVariables = environmentVariables; + InferencingServer = inferencingServer; + Inputs = inputs; + LogUri = logUri; + ModelConfiguration = modelConfiguration; + Tags = tags; + TargetEnvironmentId = targetEnvironmentId; + } + + /// + /// Base environment to start with. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public BaseEnvironmentSource BaseEnvironmentSource { get; } + /// Build id of the image build operation. + public string BuildId { get; } + /// Build state of the image build operation. + public PackageBuildState? BuildState { get; } + /// Collection of environment variables. + public IReadOnlyDictionary EnvironmentVariables { get; } + /// + /// Inferencing server configurations. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + public InferencingServer InferencingServer { get; } + /// Collection of inputs. + public IReadOnlyList Inputs { get; } + /// Log url of the image build operation. + public Uri LogUri { get; } + /// Model configuration including the mount mode. + public ModelConfiguration ModelConfiguration { get; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IReadOnlyDictionary Tags { get; } + /// Asset ID of the target environment created by package operation. + public string TargetEnvironmentId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..c68b1504d3b3d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ModelPerformanceMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("modelType"u8); + writer.WriteStringValue(ModelType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static ModelPerformanceMetricThresholdBase DeserializeModelPerformanceMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("modelType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Classification": return ClassificationModelPerformanceMetricThreshold.DeserializeClassificationModelPerformanceMetricThreshold(element); + case "Regression": return RegressionModelPerformanceMetricThreshold.DeserializeRegressionModelPerformanceMetricThreshold(element); + } + } + return UnknownModelPerformanceMetricThresholdBase.DeserializeUnknownModelPerformanceMetricThresholdBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.cs new file mode 100644 index 0000000000000..39ec2a4a17668 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceMetricThresholdBase.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The ModelPerformanceMetricThresholdBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class ModelPerformanceMetricThresholdBase + { + /// Initializes a new instance of ModelPerformanceMetricThresholdBase. + protected ModelPerformanceMetricThresholdBase() + { + } + + /// Initializes a new instance of ModelPerformanceMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal ModelPerformanceMetricThresholdBase(MonitoringModelType modelType, MonitoringThreshold threshold) + { + ModelType = modelType; + Threshold = threshold; + } + + /// [Required] Specifies the data type of the metric threshold. + internal MonitoringModelType ModelType { get; set; } + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.Serialization.cs new file mode 100644 index 0000000000000..61f060ae0850e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ModelPerformanceSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DataSegment)) + { + if (DataSegment != null) + { + writer.WritePropertyName("dataSegment"u8); + writer.WriteObjectValue(DataSegment); + } + else + { + writer.WriteNull("dataSegment"); + } + } + writer.WritePropertyName("metricThreshold"u8); + writer.WriteObjectValue(MetricThreshold); + writer.WritePropertyName("productionData"u8); + writer.WriteStartArray(); + foreach (var item in ProductionData) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("referenceData"u8); + writer.WriteObjectValue(ReferenceData); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static ModelPerformanceSignal DeserializeModelPerformanceSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional dataSegment = default; + ModelPerformanceMetricThresholdBase metricThreshold = default; + IList productionData = default; + MonitoringInputDataBase referenceData = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataSegment"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataSegment = null; + continue; + } + dataSegment = MonitoringDataSegment.DeserializeMonitoringDataSegment(property.Value); + continue; + } + if (property.NameEquals("metricThreshold"u8)) + { + metricThreshold = ModelPerformanceMetricThresholdBase.DeserializeModelPerformanceMetricThresholdBase(property.Value); + continue; + } + if (property.NameEquals("productionData"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MonitoringInputDataBase.DeserializeMonitoringInputDataBase(item)); + } + productionData = array; + continue; + } + if (property.NameEquals("referenceData"u8)) + { + referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new ModelPerformanceSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, dataSegment.Value, metricThreshold, productionData, referenceData); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.cs new file mode 100644 index 0000000000000..1a5a04d041e70 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelPerformanceSignal.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Model performance signal definition. + public partial class ModelPerformanceSignal : MonitoringSignalBase + { + /// Initializes a new instance of ModelPerformanceSignal. + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] The data produced by the production service which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// , or is null. + public ModelPerformanceSignal(ModelPerformanceMetricThresholdBase metricThreshold, IEnumerable productionData, MonitoringInputDataBase referenceData) + { + Argument.AssertNotNull(metricThreshold, nameof(metricThreshold)); + Argument.AssertNotNull(productionData, nameof(productionData)); + Argument.AssertNotNull(referenceData, nameof(referenceData)); + + MetricThreshold = metricThreshold; + ProductionData = productionData.ToList(); + ReferenceData = referenceData; + SignalType = MonitoringSignalType.ModelPerformance; + } + + /// Initializes a new instance of ModelPerformanceSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// The data segment. + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] The data produced by the production service which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal ModelPerformanceSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, MonitoringDataSegment dataSegment, ModelPerformanceMetricThresholdBase metricThreshold, IList productionData, MonitoringInputDataBase referenceData) : base(mode, properties, signalType) + { + DataSegment = dataSegment; + MetricThreshold = metricThreshold; + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = signalType; + } + + /// The data segment. + public MonitoringDataSegment DataSegment { get; set; } + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public ModelPerformanceMetricThresholdBase MetricThreshold { get; set; } + /// + /// [Required] The data produced by the production service which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public IList ProductionData { get; } + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ReferenceData { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelTaskType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelTaskType.cs new file mode 100644 index 0000000000000..35825c050882d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelTaskType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Model task type enum. + public readonly partial struct ModelTaskType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ModelTaskType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClassificationValue = "Classification"; + private const string RegressionValue = "Regression"; + private const string QuestionAnsweringValue = "QuestionAnswering"; + + /// Classification. + public static ModelTaskType Classification { get; } = new ModelTaskType(ClassificationValue); + /// Regression. + public static ModelTaskType Regression { get; } = new ModelTaskType(RegressionValue); + /// QuestionAnswering. + public static ModelTaskType QuestionAnswering { get; } = new ModelTaskType(QuestionAnsweringValue); + /// Determines if two values are the same. + public static bool operator ==(ModelTaskType left, ModelTaskType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ModelTaskType left, ModelTaskType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ModelTaskType(string value) => new ModelTaskType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ModelTaskType other && Equals(other); + /// + public bool Equals(ModelTaskType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.Serialization.cs new file mode 100644 index 0000000000000..c15bbff07d1c9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitorComputeConfigurationBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeType"u8); + writer.WriteStringValue(ComputeType.ToString()); + writer.WriteEndObject(); + } + + internal static MonitorComputeConfigurationBase DeserializeMonitorComputeConfigurationBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ServerlessSpark": return MonitorServerlessSparkCompute.DeserializeMonitorServerlessSparkCompute(element); + } + } + return UnknownMonitorComputeConfigurationBase.DeserializeUnknownMonitorComputeConfigurationBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.cs new file mode 100644 index 0000000000000..6bb735dd1faa3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeConfigurationBase.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Monitor compute configuration base definition. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class MonitorComputeConfigurationBase + { + /// Initializes a new instance of MonitorComputeConfigurationBase. + protected MonitorComputeConfigurationBase() + { + } + + /// Initializes a new instance of MonitorComputeConfigurationBase. + /// [Required] Specifies the type of signal to monitor. + internal MonitorComputeConfigurationBase(MonitorComputeType computeType) + { + ComputeType = computeType; + } + + /// [Required] Specifies the type of signal to monitor. + internal MonitorComputeType ComputeType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.Serialization.cs new file mode 100644 index 0000000000000..35c0adfa53648 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitorComputeIdentityBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeIdentityType"u8); + writer.WriteStringValue(ComputeIdentityType.ToString()); + writer.WriteEndObject(); + } + + internal static MonitorComputeIdentityBase DeserializeMonitorComputeIdentityBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("computeIdentityType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AmlToken": return AmlTokenComputeIdentity.DeserializeAmlTokenComputeIdentity(element); + case "ManagedIdentity": return ManagedComputeIdentity.DeserializeManagedComputeIdentity(element); + } + } + return UnknownMonitorComputeIdentityBase.DeserializeUnknownMonitorComputeIdentityBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.cs new file mode 100644 index 0000000000000..d4b306ac18451 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityBase.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Monitor compute identity base definition. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class MonitorComputeIdentityBase + { + /// Initializes a new instance of MonitorComputeIdentityBase. + protected MonitorComputeIdentityBase() + { + } + + /// Initializes a new instance of MonitorComputeIdentityBase. + /// [Required] Monitor compute identity type enum. + internal MonitorComputeIdentityBase(MonitorComputeIdentityType computeIdentityType) + { + ComputeIdentityType = computeIdentityType; + } + + /// [Required] Monitor compute identity type enum. + internal MonitorComputeIdentityType ComputeIdentityType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityType.cs new file mode 100644 index 0000000000000..288ce3179b88a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeIdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Monitor compute identity type enum. + internal readonly partial struct MonitorComputeIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitorComputeIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AmlTokenValue = "AmlToken"; + private const string ManagedIdentityValue = "ManagedIdentity"; + + /// Authenticates through user's AML token. + public static MonitorComputeIdentityType AmlToken { get; } = new MonitorComputeIdentityType(AmlTokenValue); + /// Authenticates through a user-provided managed identity. + public static MonitorComputeIdentityType ManagedIdentity { get; } = new MonitorComputeIdentityType(ManagedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(MonitorComputeIdentityType left, MonitorComputeIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitorComputeIdentityType left, MonitorComputeIdentityType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitorComputeIdentityType(string value) => new MonitorComputeIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitorComputeIdentityType other && Equals(other); + /// + public bool Equals(MonitorComputeIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeType.cs new file mode 100644 index 0000000000000..9f34c8ddef247 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorComputeType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Monitor compute type enum. + internal readonly partial struct MonitorComputeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitorComputeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServerlessSparkValue = "ServerlessSpark"; + + /// Serverless Spark compute. + public static MonitorComputeType ServerlessSpark { get; } = new MonitorComputeType(ServerlessSparkValue); + /// Determines if two values are the same. + public static bool operator ==(MonitorComputeType left, MonitorComputeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitorComputeType left, MonitorComputeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitorComputeType(string value) => new MonitorComputeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitorComputeType other && Equals(other); + /// + public bool Equals(MonitorComputeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs new file mode 100644 index 0000000000000..fa6540ee622c3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitorDefinition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AlertNotificationSetting)) + { + if (AlertNotificationSetting != null) + { + writer.WritePropertyName("alertNotificationSetting"u8); + writer.WriteObjectValue(AlertNotificationSetting); + } + else + { + writer.WriteNull("alertNotificationSetting"); + } + } + writer.WritePropertyName("computeConfiguration"u8); + writer.WriteObjectValue(ComputeConfiguration); + if (Optional.IsDefined(MonitoringTarget)) + { + if (MonitoringTarget != null) + { + writer.WritePropertyName("monitoringTarget"u8); + writer.WriteObjectValue(MonitoringTarget); + } + else + { + writer.WriteNull("monitoringTarget"); + } + } + writer.WritePropertyName("signals"u8); + writer.WriteStartObject(); + foreach (var item in Signals) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static MonitorDefinition DeserializeMonitorDefinition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional alertNotificationSetting = default; + MonitorComputeConfigurationBase computeConfiguration = default; + Optional monitoringTarget = default; + IDictionary signals = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alertNotificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + alertNotificationSetting = null; + continue; + } + alertNotificationSetting = MonitoringAlertNotificationSettingsBase.DeserializeMonitoringAlertNotificationSettingsBase(property.Value); + continue; + } + if (property.NameEquals("computeConfiguration"u8)) + { + computeConfiguration = MonitorComputeConfigurationBase.DeserializeMonitorComputeConfigurationBase(property.Value); + continue; + } + if (property.NameEquals("monitoringTarget"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + monitoringTarget = null; + continue; + } + monitoringTarget = MonitoringTarget.DeserializeMonitoringTarget(property.Value); + continue; + } + if (property.NameEquals("signals"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MonitoringSignalBase.DeserializeMonitoringSignalBase(property0.Value)); + } + signals = dictionary; + continue; + } + } + return new MonitorDefinition(alertNotificationSetting.Value, computeConfiguration, monitoringTarget.Value, signals); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs new file mode 100644 index 0000000000000..4a06dc73dffd2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitorDefinition. + public partial class MonitorDefinition + { + /// Initializes a new instance of MonitorDefinition. + /// + /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// + /// [Required] The signals to monitor. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , and . + /// + /// or is null. + public MonitorDefinition(MonitorComputeConfigurationBase computeConfiguration, IDictionary signals) + { + Argument.AssertNotNull(computeConfiguration, nameof(computeConfiguration)); + Argument.AssertNotNull(signals, nameof(signals)); + + ComputeConfiguration = computeConfiguration; + Signals = signals; + } + + /// Initializes a new instance of MonitorDefinition. + /// + /// The monitor's notification settings. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// The ARM resource ID of either the model or deployment targeted by this monitor. + /// + /// [Required] The signals to monitor. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , and . + /// + internal MonitorDefinition(MonitoringAlertNotificationSettingsBase alertNotificationSetting, MonitorComputeConfigurationBase computeConfiguration, MonitoringTarget monitoringTarget, IDictionary signals) + { + AlertNotificationSetting = alertNotificationSetting; + ComputeConfiguration = computeConfiguration; + MonitoringTarget = monitoringTarget; + Signals = signals; + } + + /// + /// The monitor's notification settings. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public MonitoringAlertNotificationSettingsBase AlertNotificationSetting { get; set; } + /// + /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public MonitorComputeConfigurationBase ComputeConfiguration { get; set; } + /// The ARM resource ID of either the model or deployment targeted by this monitor. + public MonitoringTarget MonitoringTarget { get; set; } + /// + /// [Required] The signals to monitor. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , and . + /// + public IDictionary Signals { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.Serialization.cs new file mode 100644 index 0000000000000..27c6dbc90bbf9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitorServerlessSparkCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeIdentity"u8); + writer.WriteObjectValue(ComputeIdentity); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WritePropertyName("runtimeVersion"u8); + writer.WriteStringValue(RuntimeVersion); + writer.WritePropertyName("computeType"u8); + writer.WriteStringValue(ComputeType.ToString()); + writer.WriteEndObject(); + } + + internal static MonitorServerlessSparkCompute DeserializeMonitorServerlessSparkCompute(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitorComputeIdentityBase computeIdentity = default; + string instanceType = default; + string runtimeVersion = default; + MonitorComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeIdentity"u8)) + { + computeIdentity = MonitorComputeIdentityBase.DeserializeMonitorComputeIdentityBase(property.Value); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("runtimeVersion"u8)) + { + runtimeVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeType"u8)) + { + computeType = new MonitorComputeType(property.Value.GetString()); + continue; + } + } + return new MonitorServerlessSparkCompute(computeType, computeIdentity, instanceType, runtimeVersion); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.cs new file mode 100644 index 0000000000000..a96796bd8fcb3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorServerlessSparkCompute.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Monitor serverless spark compute definition. + public partial class MonitorServerlessSparkCompute : MonitorComputeConfigurationBase + { + /// Initializes a new instance of MonitorServerlessSparkCompute. + /// + /// [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// [Required] The instance type running the Spark job. + /// [Required] The Spark runtime version. + /// , or is null. + public MonitorServerlessSparkCompute(MonitorComputeIdentityBase computeIdentity, string instanceType, string runtimeVersion) + { + Argument.AssertNotNull(computeIdentity, nameof(computeIdentity)); + Argument.AssertNotNull(instanceType, nameof(instanceType)); + Argument.AssertNotNull(runtimeVersion, nameof(runtimeVersion)); + + ComputeIdentity = computeIdentity; + InstanceType = instanceType; + RuntimeVersion = runtimeVersion; + ComputeType = MonitorComputeType.ServerlessSpark; + } + + /// Initializes a new instance of MonitorServerlessSparkCompute. + /// [Required] Specifies the type of signal to monitor. + /// + /// [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// [Required] The instance type running the Spark job. + /// [Required] The Spark runtime version. + internal MonitorServerlessSparkCompute(MonitorComputeType computeType, MonitorComputeIdentityBase computeIdentity, string instanceType, string runtimeVersion) : base(computeType) + { + ComputeIdentity = computeIdentity; + InstanceType = instanceType; + RuntimeVersion = runtimeVersion; + ComputeType = computeType; + } + + /// + /// [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public MonitorComputeIdentityBase ComputeIdentity { get; set; } + /// [Required] The instance type running the Spark job. + public string InstanceType { get; set; } + /// [Required] The Spark runtime version. + public string RuntimeVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.Serialization.cs new file mode 100644 index 0000000000000..b987f2d7cdc19 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitoringAlertNotificationSettingsBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("alertNotificationType"u8); + writer.WriteStringValue(AlertNotificationType.ToString()); + writer.WriteEndObject(); + } + + internal static MonitoringAlertNotificationSettingsBase DeserializeMonitoringAlertNotificationSettingsBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("alertNotificationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureMonitor": return AzMonMonitoringAlertNotificationSettings.DeserializeAzMonMonitoringAlertNotificationSettings(element); + case "Email": return EmailMonitoringAlertNotificationSettings.DeserializeEmailMonitoringAlertNotificationSettings(element); + } + } + return UnknownMonitoringAlertNotificationSettingsBase.DeserializeUnknownMonitoringAlertNotificationSettingsBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.cs new file mode 100644 index 0000000000000..dabc470e1e907 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationSettingsBase.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MonitoringAlertNotificationSettingsBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class MonitoringAlertNotificationSettingsBase + { + /// Initializes a new instance of MonitoringAlertNotificationSettingsBase. + protected MonitoringAlertNotificationSettingsBase() + { + } + + /// Initializes a new instance of MonitoringAlertNotificationSettingsBase. + /// [Required] Specifies the type of signal to monitor. + internal MonitoringAlertNotificationSettingsBase(MonitoringAlertNotificationType alertNotificationType) + { + AlertNotificationType = alertNotificationType; + } + + /// [Required] Specifies the type of signal to monitor. + internal MonitoringAlertNotificationType AlertNotificationType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationType.cs new file mode 100644 index 0000000000000..668b52b5e0ca8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringAlertNotificationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringAlertNotificationType. + internal readonly partial struct MonitoringAlertNotificationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringAlertNotificationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureMonitorValue = "AzureMonitor"; + private const string EmailValue = "Email"; + + /// Settings for Azure Monitor based alerting. + public static MonitoringAlertNotificationType AzureMonitor { get; } = new MonitoringAlertNotificationType(AzureMonitorValue); + /// Settings for AML email notifications. + public static MonitoringAlertNotificationType Email { get; } = new MonitoringAlertNotificationType(EmailValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringAlertNotificationType left, MonitoringAlertNotificationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringAlertNotificationType left, MonitoringAlertNotificationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringAlertNotificationType(string value) => new MonitoringAlertNotificationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringAlertNotificationType other && Equals(other); + /// + public bool Equals(MonitoringAlertNotificationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.Serialization.cs new file mode 100644 index 0000000000000..fb20b620b12ae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.Serialization.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitoringDataSegment : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Feature)) + { + if (Feature != null) + { + writer.WritePropertyName("feature"u8); + writer.WriteStringValue(Feature); + } + else + { + writer.WriteNull("feature"); + } + } + if (Optional.IsCollectionDefined(Values)) + { + if (Values != null) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("values"); + } + } + writer.WriteEndObject(); + } + + internal static MonitoringDataSegment DeserializeMonitoringDataSegment(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional feature = default; + Optional> values = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("feature"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + feature = null; + continue; + } + feature = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + values = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + values = array; + continue; + } + } + return new MonitoringDataSegment(feature.Value, Optional.ToList(values)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.cs new file mode 100644 index 0000000000000..21e3c6e3a2092 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringDataSegment.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringDataSegment. + public partial class MonitoringDataSegment + { + /// Initializes a new instance of MonitoringDataSegment. + public MonitoringDataSegment() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of MonitoringDataSegment. + /// The feature to segment the data on. + /// Filters for only the specified values of the given segmented feature. + internal MonitoringDataSegment(string feature, IList values) + { + Feature = feature; + Values = values; + } + + /// The feature to segment the data on. + public string Feature { get; set; } + /// Filters for only the specified values of the given segmented feature. + public IList Values { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureDataType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureDataType.cs new file mode 100644 index 0000000000000..d73ab3e382d1f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureDataType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringFeatureDataType. + public readonly partial struct MonitoringFeatureDataType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringFeatureDataType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NumericalValue = "Numerical"; + private const string CategoricalValue = "Categorical"; + + /// Used for features of numerical data type. + public static MonitoringFeatureDataType Numerical { get; } = new MonitoringFeatureDataType(NumericalValue); + /// Used for features of categorical data type. + public static MonitoringFeatureDataType Categorical { get; } = new MonitoringFeatureDataType(CategoricalValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringFeatureDataType left, MonitoringFeatureDataType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringFeatureDataType left, MonitoringFeatureDataType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringFeatureDataType(string value) => new MonitoringFeatureDataType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringFeatureDataType other && Equals(other); + /// + public bool Equals(MonitoringFeatureDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.Serialization.cs new file mode 100644 index 0000000000000..97510a3c84dcc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitoringFeatureFilterBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("filterType"u8); + writer.WriteStringValue(FilterType.ToString()); + writer.WriteEndObject(); + } + + internal static MonitoringFeatureFilterBase DeserializeMonitoringFeatureFilterBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("filterType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AllFeatures": return MachineLearningAllFeatures.DeserializeMachineLearningAllFeatures(element); + case "FeatureSubset": return FeatureSubset.DeserializeFeatureSubset(element); + case "TopNByAttribution": return TopNFeaturesByAttribution.DeserializeTopNFeaturesByAttribution(element); + } + } + return UnknownMonitoringFeatureFilterBase.DeserializeUnknownMonitoringFeatureFilterBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.cs new file mode 100644 index 0000000000000..dd5f4113ea1a0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterBase.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MonitoringFeatureFilterBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class MonitoringFeatureFilterBase + { + /// Initializes a new instance of MonitoringFeatureFilterBase. + protected MonitoringFeatureFilterBase() + { + } + + /// Initializes a new instance of MonitoringFeatureFilterBase. + /// [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + internal MonitoringFeatureFilterBase(MonitoringFeatureFilterType filterType) + { + FilterType = filterType; + } + + /// [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + internal MonitoringFeatureFilterType FilterType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterType.cs new file mode 100644 index 0000000000000..298f0fbc5d53b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringFeatureFilterType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringFeatureFilterType. + internal readonly partial struct MonitoringFeatureFilterType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringFeatureFilterType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllFeaturesValue = "AllFeatures"; + private const string TopNByAttributionValue = "TopNByAttribution"; + private const string FeatureSubsetValue = "FeatureSubset"; + + /// Includes all features. + public static MonitoringFeatureFilterType AllFeatures { get; } = new MonitoringFeatureFilterType(AllFeaturesValue); + /// Only includes the top contributing features, measured by feature attribution. + public static MonitoringFeatureFilterType TopNByAttribution { get; } = new MonitoringFeatureFilterType(TopNByAttributionValue); + /// Includes a user-defined subset of features. + public static MonitoringFeatureFilterType FeatureSubset { get; } = new MonitoringFeatureFilterType(FeatureSubsetValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringFeatureFilterType left, MonitoringFeatureFilterType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringFeatureFilterType left, MonitoringFeatureFilterType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringFeatureFilterType(string value) => new MonitoringFeatureFilterType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringFeatureFilterType other && Equals(other); + /// + public bool Equals(MonitoringFeatureFilterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs new file mode 100644 index 0000000000000..48d945cb56ba5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitoringInputDataBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Columns)) + { + if (Columns != null) + { + writer.WritePropertyName("columns"u8); + writer.WriteStartObject(); + foreach (var item in Columns) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("columns"); + } + } + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + writer.WriteEndObject(); + } + + internal static MonitoringInputDataBase DeserializeMonitoringInputDataBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("inputDataType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Fixed": return FixedInputData.DeserializeFixedInputData(element); + case "Static": return StaticInputData.DeserializeStaticInputData(element); + case "Trailing": return TrailingInputData.DeserializeTrailingInputData(element); + } + } + return UnknownMonitoringInputDataBase.DeserializeUnknownMonitoringInputDataBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs new file mode 100644 index 0000000000000..bdd882e7ecad4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Monitoring input data base definition. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class MonitoringInputDataBase + { + /// Initializes a new instance of MonitoringInputDataBase. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + /// is null. + protected MonitoringInputDataBase(JobInputType jobInputType, Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Columns = new ChangeTrackingDictionary(); + JobInputType = jobInputType; + Uri = uri; + } + + /// Initializes a new instance of MonitoringInputDataBase. + /// Mapping of column names to special uses. + /// The context metadata of the data source. + /// [Required] Specifies the type of signal to monitor. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + internal MonitoringInputDataBase(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri) + { + Columns = columns; + DataContext = dataContext; + InputDataType = inputDataType; + JobInputType = jobInputType; + Uri = uri; + } + + /// Mapping of column names to special uses. + public IDictionary Columns { get; set; } + /// The context metadata of the data source. + public string DataContext { get; set; } + /// [Required] Specifies the type of signal to monitor. + internal MonitoringInputDataType InputDataType { get; set; } + /// [Required] Specifies the type of job. + public JobInputType JobInputType { get; set; } + /// [Required] Input Asset URI. + public Uri Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataType.cs new file mode 100644 index 0000000000000..2e58f4f9efaf0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Monitoring input data type enum. + internal readonly partial struct MonitoringInputDataType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringInputDataType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StaticValue = "Static"; + private const string TrailingValue = "Trailing"; + private const string FixedValue = "Fixed"; + + /// An input data with a fixed window size. + public static MonitoringInputDataType Static { get; } = new MonitoringInputDataType(StaticValue); + /// An input data which trailing relatively to the monitor's current run. + public static MonitoringInputDataType Trailing { get; } = new MonitoringInputDataType(TrailingValue); + /// An input data with tabular format which doesn't require preprocessing. + public static MonitoringInputDataType Fixed { get; } = new MonitoringInputDataType(FixedValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringInputDataType left, MonitoringInputDataType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringInputDataType left, MonitoringInputDataType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringInputDataType(string value) => new MonitoringInputDataType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringInputDataType other && Equals(other); + /// + public bool Equals(MonitoringInputDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringModelType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringModelType.cs new file mode 100644 index 0000000000000..ec404d2aed5a7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringModelType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringModelType. + public readonly partial struct MonitoringModelType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringModelType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClassificationValue = "Classification"; + private const string RegressionValue = "Regression"; + + /// A model trained for classification tasks. + public static MonitoringModelType Classification { get; } = new MonitoringModelType(ClassificationValue); + /// A model trained for regressions tasks. + public static MonitoringModelType Regression { get; } = new MonitoringModelType(RegressionValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringModelType left, MonitoringModelType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringModelType left, MonitoringModelType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringModelType(string value) => new MonitoringModelType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringModelType other && Equals(other); + /// + public bool Equals(MonitoringModelType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringNotificationMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringNotificationMode.cs new file mode 100644 index 0000000000000..7f609577c192c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringNotificationMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringNotificationMode. + public readonly partial struct MonitoringNotificationMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringNotificationMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Disabled notifications will not produce emails/metrics leveraged for alerting. + public static MonitoringNotificationMode Disabled { get; } = new MonitoringNotificationMode(DisabledValue); + /// Enabled notification will produce emails/metrics leveraged for alerting. + public static MonitoringNotificationMode Enabled { get; } = new MonitoringNotificationMode(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringNotificationMode left, MonitoringNotificationMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringNotificationMode left, MonitoringNotificationMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringNotificationMode(string value) => new MonitoringNotificationMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringNotificationMode other && Equals(other); + /// + public bool Equals(MonitoringNotificationMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs new file mode 100644 index 0000000000000..e1e1e7fcdd033 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitoringSignalBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static MonitoringSignalBase DeserializeMonitoringSignalBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("signalType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Custom": return CustomMonitoringSignal.DeserializeCustomMonitoringSignal(element); + case "DataDrift": return DataDriftMonitoringSignal.DeserializeDataDriftMonitoringSignal(element); + case "DataQuality": return DataQualityMonitoringSignal.DeserializeDataQualityMonitoringSignal(element); + case "FeatureAttributionDrift": return FeatureAttributionDriftMonitoringSignal.DeserializeFeatureAttributionDriftMonitoringSignal(element); + case "GenerationSafetyQuality": return GenerationSafetyQualityMonitoringSignal.DeserializeGenerationSafetyQualityMonitoringSignal(element); + case "GenerationTokenStatistics": return GenerationTokenStatisticsSignal.DeserializeGenerationTokenStatisticsSignal(element); + case "ModelPerformance": return ModelPerformanceSignal.DeserializeModelPerformanceSignal(element); + case "PredictionDrift": return PredictionDriftMonitoringSignal.DeserializePredictionDriftMonitoringSignal(element); + } + } + return UnknownMonitoringSignalBase.DeserializeUnknownMonitoringSignalBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs new file mode 100644 index 0000000000000..02c67e73f0691 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MonitoringSignalBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , and . + /// + public abstract partial class MonitoringSignalBase + { + /// Initializes a new instance of MonitoringSignalBase. + protected MonitoringSignalBase() + { + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MonitoringSignalBase. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + internal MonitoringSignalBase(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType) + { + Mode = mode; + Properties = properties; + SignalType = signalType; + } + + /// The current notification mode for this signal. + public MonitoringNotificationMode? Mode { get; set; } + /// Property dictionary. Properties can be added, but not removed or altered. + public IDictionary Properties { get; set; } + /// [Required] Specifies the type of signal to monitor. + internal MonitoringSignalType SignalType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalType.cs new file mode 100644 index 0000000000000..a30c4a5a17cf2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringSignalType. + internal readonly partial struct MonitoringSignalType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoringSignalType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DataDriftValue = "DataDrift"; + private const string PredictionDriftValue = "PredictionDrift"; + private const string DataQualityValue = "DataQuality"; + private const string FeatureAttributionDriftValue = "FeatureAttributionDrift"; + private const string CustomValue = "Custom"; + private const string ModelPerformanceValue = "ModelPerformance"; + private const string GenerationSafetyQualityValue = "GenerationSafetyQuality"; + private const string GenerationTokenStatisticsValue = "GenerationTokenStatistics"; + + /// Tracks model input data distribution change, comparing against training data or past production data. + public static MonitoringSignalType DataDrift { get; } = new MonitoringSignalType(DataDriftValue); + /// Tracks prediction result data distribution change, comparing against validation/test label data or past production data. + public static MonitoringSignalType PredictionDrift { get; } = new MonitoringSignalType(PredictionDriftValue); + /// Tracks model input data integrity. + public static MonitoringSignalType DataQuality { get; } = new MonitoringSignalType(DataQualityValue); + /// Tracks feature importance change in production, comparing against feature importance at training time. + public static MonitoringSignalType FeatureAttributionDrift { get; } = new MonitoringSignalType(FeatureAttributionDriftValue); + /// Tracks a custom signal provided by users. + public static MonitoringSignalType Custom { get; } = new MonitoringSignalType(CustomValue); + /// Tracks model performance based on ground truth data. + public static MonitoringSignalType ModelPerformance { get; } = new MonitoringSignalType(ModelPerformanceValue); + /// Tracks the safety and quality of generated content. + public static MonitoringSignalType GenerationSafetyQuality { get; } = new MonitoringSignalType(GenerationSafetyQualityValue); + /// Tracks the token usage of generative endpoints. + public static MonitoringSignalType GenerationTokenStatistics { get; } = new MonitoringSignalType(GenerationTokenStatisticsValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoringSignalType left, MonitoringSignalType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoringSignalType left, MonitoringSignalType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoringSignalType(string value) => new MonitoringSignalType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoringSignalType other && Equals(other); + /// + public bool Equals(MonitoringSignalType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs new file mode 100644 index 0000000000000..31a1e2f868e90 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitoringTarget : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DeploymentId)) + { + if (DeploymentId != null) + { + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); + } + else + { + writer.WriteNull("deploymentId"); + } + } + if (Optional.IsDefined(ModelId)) + { + if (ModelId != null) + { + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + } + else + { + writer.WriteNull("modelId"); + } + } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); + writer.WriteEndObject(); + } + + internal static MonitoringTarget DeserializeMonitoringTarget(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional deploymentId = default; + Optional modelId = default; + ModelTaskType taskType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + deploymentId = null; + continue; + } + deploymentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelId = null; + continue; + } + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskType"u8)) + { + taskType = new ModelTaskType(property.Value.GetString()); + continue; + } + } + return new MonitoringTarget(deploymentId.Value, modelId.Value, taskType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs new file mode 100644 index 0000000000000..cd72d7ca054f2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Monitoring target definition. + public partial class MonitoringTarget + { + /// Initializes a new instance of MonitoringTarget. + /// [Required] The machine learning task type of the model. + public MonitoringTarget(ModelTaskType taskType) + { + TaskType = taskType; + } + + /// Initializes a new instance of MonitoringTarget. + /// The ARM resource ID of either the deployment targeted by this monitor. + /// The ARM resource ID of either the model targeted by this monitor. + /// [Required] The machine learning task type of the model. + internal MonitoringTarget(string deploymentId, string modelId, ModelTaskType taskType) + { + DeploymentId = deploymentId; + ModelId = modelId; + TaskType = taskType; + } + + /// The ARM resource ID of either the deployment targeted by this monitor. + public string DeploymentId { get; set; } + /// The ARM resource ID of either the model targeted by this monitor. + public string ModelId { get; set; } + /// [Required] The machine learning task type of the model. + public ModelTaskType TaskType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.Serialization.cs new file mode 100644 index 0000000000000..1e90c6740527a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class MonitoringThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Value)) + { + if (Value != null) + { + writer.WritePropertyName("value"u8); + writer.WriteNumberValue(Value.Value); + } + else + { + writer.WriteNull("value"); + } + } + writer.WriteEndObject(); + } + + internal static MonitoringThreshold DeserializeMonitoringThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + value = null; + continue; + } + value = property.Value.GetDouble(); + continue; + } + } + return new MonitoringThreshold(Optional.ToNullable(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.cs new file mode 100644 index 0000000000000..f088ea07fdcae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringThreshold.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MonitoringThreshold. + internal partial class MonitoringThreshold + { + /// Initializes a new instance of MonitoringThreshold. + public MonitoringThreshold() + { + } + + /// Initializes a new instance of MonitoringThreshold. + /// The threshold value. If null, the set default is dependent on the metric type. + internal MonitoringThreshold(double? value) + { + Value = value; + } + + /// The threshold value. If null, the set default is dependent on the metric type. + public double? Value { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.Serialization.cs new file mode 100644 index 0000000000000..40eb806fc3a4f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MonitoringWorkspaceConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + if (Optional.IsCollectionDefined(Secrets)) + { + if (Secrets != null) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartObject(); + foreach (var item in Secrets) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secrets"); + } + } + writer.WriteEndObject(); + } + + internal static MonitoringWorkspaceConnection DeserializeMonitoringWorkspaceConnection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> environmentVariables = default; + Optional> secrets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("environmentVariables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secrets = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + secrets = dictionary; + continue; + } + } + return new MonitoringWorkspaceConnection(Optional.ToDictionary(environmentVariables), Optional.ToDictionary(secrets)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.cs new file mode 100644 index 0000000000000..77f5fdcb08a38 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringWorkspaceConnection.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Monitoring workspace connection definition. + public partial class MonitoringWorkspaceConnection + { + /// Initializes a new instance of MonitoringWorkspaceConnection. + public MonitoringWorkspaceConnection() + { + EnvironmentVariables = new ChangeTrackingDictionary(); + Secrets = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MonitoringWorkspaceConnection. + /// + /// The properties of a workspace service connection to store as environment variables in the submitted jobs. + /// Key is workspace connection property path, name is environment variable key. + /// + /// + /// The properties of a workspace service connection to store as secrets in the submitted jobs. + /// Key is workspace connection property path, name is secret key. + /// + internal MonitoringWorkspaceConnection(IDictionary environmentVariables, IDictionary secrets) + { + EnvironmentVariables = environmentVariables; + Secrets = secrets; + } + + /// + /// The properties of a workspace service connection to store as environment variables in the submitted jobs. + /// Key is workspace connection property path, name is environment variable key. + /// + public IDictionary EnvironmentVariables { get; set; } + /// + /// The properties of a workspace service connection to store as secrets in the submitted jobs. + /// Key is workspace connection property path, name is secret key. + /// + public IDictionary Secrets { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.Serialization.cs new file mode 100644 index 0000000000000..3dc871dfb64d6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MountBindOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Propagation)) + { + if (Propagation != null) + { + writer.WritePropertyName("propagation"u8); + writer.WriteStringValue(Propagation); + } + else + { + writer.WriteNull("propagation"); + } + } + if (Optional.IsDefined(DoesCreateHostPath)) + { + if (DoesCreateHostPath != null) + { + writer.WritePropertyName("createHostPath"u8); + writer.WriteBooleanValue(DoesCreateHostPath.Value); + } + else + { + writer.WriteNull("createHostPath"); + } + } + if (Optional.IsDefined(Selinux)) + { + if (Selinux != null) + { + writer.WritePropertyName("selinux"u8); + writer.WriteStringValue(Selinux); + } + else + { + writer.WriteNull("selinux"); + } + } + writer.WriteEndObject(); + } + + internal static MountBindOptions DeserializeMountBindOptions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional propagation = default; + Optional createHostPath = default; + Optional selinux = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("propagation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + propagation = null; + continue; + } + propagation = property.Value.GetString(); + continue; + } + if (property.NameEquals("createHostPath"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + createHostPath = null; + continue; + } + createHostPath = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("selinux"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + selinux = null; + continue; + } + selinux = property.Value.GetString(); + continue; + } + } + return new MountBindOptions(propagation.Value, Optional.ToNullable(createHostPath), selinux.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs new file mode 100644 index 0000000000000..199ec7fbdbc07 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The MountBindOptions. + public partial class MountBindOptions + { + /// Initializes a new instance of MountBindOptions. + public MountBindOptions() + { + } + + /// Initializes a new instance of MountBindOptions. + /// Type of Bind Option. + /// Indicate whether to create host path. + /// Mention the selinux options. + internal MountBindOptions(string propagation, bool? doesCreateHostPath, string selinux) + { + Propagation = propagation; + DoesCreateHostPath = doesCreateHostPath; + Selinux = selinux; + } + + /// Type of Bind Option. + public string Propagation { get; set; } + /// Indicate whether to create host path. + public bool? DoesCreateHostPath { get; set; } + /// Mention the selinux options. + public string Selinux { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NetworkingRuleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NetworkingRuleAction.cs new file mode 100644 index 0000000000000..42e6de3267134 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NetworkingRuleAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The action enum for networking rule. + public readonly partial struct NetworkingRuleAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkingRuleAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DenyValue = "Deny"; + + /// Allow. + public static NetworkingRuleAction Allow { get; } = new NetworkingRuleAction(AllowValue); + /// Deny. + public static NetworkingRuleAction Deny { get; } = new NetworkingRuleAction(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkingRuleAction left, NetworkingRuleAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkingRuleAction left, NetworkingRuleAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkingRuleAction(string value) => new NetworkingRuleAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkingRuleAction other && Equals(other); + /// + public bool Equals(NetworkingRuleAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.Serialization.cs new file mode 100644 index 0000000000000..7214cc032f6e2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.Serialization.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class NlpFixedParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(GradientAccumulationSteps)) + { + if (GradientAccumulationSteps != null) + { + writer.WritePropertyName("gradientAccumulationSteps"u8); + writer.WriteNumberValue(GradientAccumulationSteps.Value); + } + else + { + writer.WriteNull("gradientAccumulationSteps"); + } + } + if (Optional.IsDefined(LearningRate)) + { + if (LearningRate != null) + { + writer.WritePropertyName("learningRate"u8); + writer.WriteNumberValue(LearningRate.Value); + } + else + { + writer.WriteNull("learningRate"); + } + } + if (Optional.IsDefined(LearningRateScheduler)) + { + writer.WritePropertyName("learningRateScheduler"u8); + writer.WriteStringValue(LearningRateScheduler.Value.ToString()); + } + if (Optional.IsDefined(ModelName)) + { + if (ModelName != null) + { + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + } + else + { + writer.WriteNull("modelName"); + } + } + if (Optional.IsDefined(NumberOfEpochs)) + { + if (NumberOfEpochs != null) + { + writer.WritePropertyName("numberOfEpochs"u8); + writer.WriteNumberValue(NumberOfEpochs.Value); + } + else + { + writer.WriteNull("numberOfEpochs"); + } + } + if (Optional.IsDefined(TrainingBatchSize)) + { + if (TrainingBatchSize != null) + { + writer.WritePropertyName("trainingBatchSize"u8); + writer.WriteNumberValue(TrainingBatchSize.Value); + } + else + { + writer.WriteNull("trainingBatchSize"); + } + } + if (Optional.IsDefined(ValidationBatchSize)) + { + if (ValidationBatchSize != null) + { + writer.WritePropertyName("validationBatchSize"u8); + writer.WriteNumberValue(ValidationBatchSize.Value); + } + else + { + writer.WriteNull("validationBatchSize"); + } + } + if (Optional.IsDefined(WarmupRatio)) + { + if (WarmupRatio != null) + { + writer.WritePropertyName("warmupRatio"u8); + writer.WriteNumberValue(WarmupRatio.Value); + } + else + { + writer.WriteNull("warmupRatio"); + } + } + if (Optional.IsDefined(WeightDecay)) + { + if (WeightDecay != null) + { + writer.WritePropertyName("weightDecay"u8); + writer.WriteNumberValue(WeightDecay.Value); + } + else + { + writer.WriteNull("weightDecay"); + } + } + writer.WriteEndObject(); + } + + internal static NlpFixedParameters DeserializeNlpFixedParameters(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional gradientAccumulationSteps = default; + Optional learningRate = default; + Optional learningRateScheduler = default; + Optional modelName = default; + Optional numberOfEpochs = default; + Optional trainingBatchSize = default; + Optional validationBatchSize = default; + Optional warmupRatio = default; + Optional weightDecay = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gradientAccumulationSteps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + gradientAccumulationSteps = null; + continue; + } + gradientAccumulationSteps = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("learningRate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + learningRate = null; + continue; + } + learningRate = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("learningRateScheduler"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + learningRateScheduler = new NlpLearningRateScheduler(property.Value.GetString()); + continue; + } + if (property.NameEquals("modelName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelName = null; + continue; + } + modelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("numberOfEpochs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + numberOfEpochs = null; + continue; + } + numberOfEpochs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trainingBatchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + trainingBatchSize = null; + continue; + } + trainingBatchSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("validationBatchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + validationBatchSize = null; + continue; + } + validationBatchSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("warmupRatio"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + warmupRatio = null; + continue; + } + warmupRatio = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("weightDecay"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + weightDecay = null; + continue; + } + weightDecay = property.Value.GetSingle(); + continue; + } + } + return new NlpFixedParameters(Optional.ToNullable(gradientAccumulationSteps), Optional.ToNullable(learningRate), Optional.ToNullable(learningRateScheduler), modelName.Value, Optional.ToNullable(numberOfEpochs), Optional.ToNullable(trainingBatchSize), Optional.ToNullable(validationBatchSize), Optional.ToNullable(warmupRatio), Optional.ToNullable(weightDecay)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.cs new file mode 100644 index 0000000000000..ab2a79b3a703b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpFixedParameters.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Fixed training parameters that won't be swept over during AutoML NLP training. + public partial class NlpFixedParameters + { + /// Initializes a new instance of NlpFixedParameters. + public NlpFixedParameters() + { + } + + /// Initializes a new instance of NlpFixedParameters. + /// Number of steps to accumulate gradients over before running a backward pass. + /// The learning rate for the training procedure. + /// The type of learning rate schedule to use during the training procedure. + /// The name of the model to train. + /// Number of training epochs. + /// The batch size for the training procedure. + /// The batch size to be used during evaluation. + /// The warmup ratio, used alongside LrSchedulerType. + /// The weight decay for the training procedure. + internal NlpFixedParameters(int? gradientAccumulationSteps, float? learningRate, NlpLearningRateScheduler? learningRateScheduler, string modelName, int? numberOfEpochs, int? trainingBatchSize, int? validationBatchSize, float? warmupRatio, float? weightDecay) + { + GradientAccumulationSteps = gradientAccumulationSteps; + LearningRate = learningRate; + LearningRateScheduler = learningRateScheduler; + ModelName = modelName; + NumberOfEpochs = numberOfEpochs; + TrainingBatchSize = trainingBatchSize; + ValidationBatchSize = validationBatchSize; + WarmupRatio = warmupRatio; + WeightDecay = weightDecay; + } + + /// Number of steps to accumulate gradients over before running a backward pass. + public int? GradientAccumulationSteps { get; set; } + /// The learning rate for the training procedure. + public float? LearningRate { get; set; } + /// The type of learning rate schedule to use during the training procedure. + public NlpLearningRateScheduler? LearningRateScheduler { get; set; } + /// The name of the model to train. + public string ModelName { get; set; } + /// Number of training epochs. + public int? NumberOfEpochs { get; set; } + /// The batch size for the training procedure. + public int? TrainingBatchSize { get; set; } + /// The batch size to be used during evaluation. + public int? ValidationBatchSize { get; set; } + /// The warmup ratio, used alongside LrSchedulerType. + public float? WarmupRatio { get; set; } + /// The weight decay for the training procedure. + public float? WeightDecay { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpLearningRateScheduler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpLearningRateScheduler.cs new file mode 100644 index 0000000000000..12bb3aeee7574 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpLearningRateScheduler.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum of learning rate schedulers that aligns with those supported by HF. + public readonly partial struct NlpLearningRateScheduler : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NlpLearningRateScheduler(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string LinearValue = "Linear"; + private const string CosineValue = "Cosine"; + private const string CosineWithRestartsValue = "CosineWithRestarts"; + private const string PolynomialValue = "Polynomial"; + private const string ConstantValue = "Constant"; + private const string ConstantWithWarmupValue = "ConstantWithWarmup"; + + /// No learning rate schedule. + public static NlpLearningRateScheduler None { get; } = new NlpLearningRateScheduler(NoneValue); + /// Linear warmup and decay. + public static NlpLearningRateScheduler Linear { get; } = new NlpLearningRateScheduler(LinearValue); + /// Linear warmup then cosine decay. + public static NlpLearningRateScheduler Cosine { get; } = new NlpLearningRateScheduler(CosineValue); + /// Linear warmup, cosine decay, then restart to initial LR. + public static NlpLearningRateScheduler CosineWithRestarts { get; } = new NlpLearningRateScheduler(CosineWithRestartsValue); + /// Increase linearly then polynomially decay. + public static NlpLearningRateScheduler Polynomial { get; } = new NlpLearningRateScheduler(PolynomialValue); + /// Constant learning rate. + public static NlpLearningRateScheduler Constant { get; } = new NlpLearningRateScheduler(ConstantValue); + /// Linear warmup followed by constant value. + public static NlpLearningRateScheduler ConstantWithWarmup { get; } = new NlpLearningRateScheduler(ConstantWithWarmupValue); + /// Determines if two values are the same. + public static bool operator ==(NlpLearningRateScheduler left, NlpLearningRateScheduler right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NlpLearningRateScheduler left, NlpLearningRateScheduler right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NlpLearningRateScheduler(string value) => new NlpLearningRateScheduler(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NlpLearningRateScheduler other && Equals(other); + /// + public bool Equals(NlpLearningRateScheduler other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.Serialization.cs new file mode 100644 index 0000000000000..bcf238f00e4bd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.Serialization.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class NlpParameterSubspace : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(GradientAccumulationSteps)) + { + if (GradientAccumulationSteps != null) + { + writer.WritePropertyName("gradientAccumulationSteps"u8); + writer.WriteStringValue(GradientAccumulationSteps); + } + else + { + writer.WriteNull("gradientAccumulationSteps"); + } + } + if (Optional.IsDefined(LearningRate)) + { + if (LearningRate != null) + { + writer.WritePropertyName("learningRate"u8); + writer.WriteStringValue(LearningRate); + } + else + { + writer.WriteNull("learningRate"); + } + } + if (Optional.IsDefined(LearningRateScheduler)) + { + if (LearningRateScheduler != null) + { + writer.WritePropertyName("learningRateScheduler"u8); + writer.WriteStringValue(LearningRateScheduler); + } + else + { + writer.WriteNull("learningRateScheduler"); + } + } + if (Optional.IsDefined(ModelName)) + { + if (ModelName != null) + { + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + } + else + { + writer.WriteNull("modelName"); + } + } + if (Optional.IsDefined(NumberOfEpochs)) + { + if (NumberOfEpochs != null) + { + writer.WritePropertyName("numberOfEpochs"u8); + writer.WriteStringValue(NumberOfEpochs); + } + else + { + writer.WriteNull("numberOfEpochs"); + } + } + if (Optional.IsDefined(TrainingBatchSize)) + { + if (TrainingBatchSize != null) + { + writer.WritePropertyName("trainingBatchSize"u8); + writer.WriteStringValue(TrainingBatchSize); + } + else + { + writer.WriteNull("trainingBatchSize"); + } + } + if (Optional.IsDefined(ValidationBatchSize)) + { + if (ValidationBatchSize != null) + { + writer.WritePropertyName("validationBatchSize"u8); + writer.WriteStringValue(ValidationBatchSize); + } + else + { + writer.WriteNull("validationBatchSize"); + } + } + if (Optional.IsDefined(WarmupRatio)) + { + if (WarmupRatio != null) + { + writer.WritePropertyName("warmupRatio"u8); + writer.WriteStringValue(WarmupRatio); + } + else + { + writer.WriteNull("warmupRatio"); + } + } + if (Optional.IsDefined(WeightDecay)) + { + if (WeightDecay != null) + { + writer.WritePropertyName("weightDecay"u8); + writer.WriteStringValue(WeightDecay); + } + else + { + writer.WriteNull("weightDecay"); + } + } + writer.WriteEndObject(); + } + + internal static NlpParameterSubspace DeserializeNlpParameterSubspace(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional gradientAccumulationSteps = default; + Optional learningRate = default; + Optional learningRateScheduler = default; + Optional modelName = default; + Optional numberOfEpochs = default; + Optional trainingBatchSize = default; + Optional validationBatchSize = default; + Optional warmupRatio = default; + Optional weightDecay = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gradientAccumulationSteps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + gradientAccumulationSteps = null; + continue; + } + gradientAccumulationSteps = property.Value.GetString(); + continue; + } + if (property.NameEquals("learningRate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + learningRate = null; + continue; + } + learningRate = property.Value.GetString(); + continue; + } + if (property.NameEquals("learningRateScheduler"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + learningRateScheduler = null; + continue; + } + learningRateScheduler = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelName = null; + continue; + } + modelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("numberOfEpochs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + numberOfEpochs = null; + continue; + } + numberOfEpochs = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingBatchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + trainingBatchSize = null; + continue; + } + trainingBatchSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("validationBatchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + validationBatchSize = null; + continue; + } + validationBatchSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("warmupRatio"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + warmupRatio = null; + continue; + } + warmupRatio = property.Value.GetString(); + continue; + } + if (property.NameEquals("weightDecay"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + weightDecay = null; + continue; + } + weightDecay = property.Value.GetString(); + continue; + } + } + return new NlpParameterSubspace(gradientAccumulationSteps.Value, learningRate.Value, learningRateScheduler.Value, modelName.Value, numberOfEpochs.Value, trainingBatchSize.Value, validationBatchSize.Value, warmupRatio.Value, weightDecay.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.cs new file mode 100644 index 0000000000000..2fc11ac2c4312 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpParameterSubspace.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Stringified search spaces for each parameter. See below examples. + public partial class NlpParameterSubspace + { + /// Initializes a new instance of NlpParameterSubspace. + public NlpParameterSubspace() + { + } + + /// Initializes a new instance of NlpParameterSubspace. + /// Number of steps to accumulate gradients over before running a backward pass. + /// The learning rate for the training procedure. + /// The type of learning rate schedule to use during the training procedure. + /// The name of the model to train. + /// Number of training epochs. + /// The batch size for the training procedure. + /// The batch size to be used during evaluation. + /// The warmup ratio, used alongside LrSchedulerType. + /// The weight decay for the training procedure. + internal NlpParameterSubspace(string gradientAccumulationSteps, string learningRate, string learningRateScheduler, string modelName, string numberOfEpochs, string trainingBatchSize, string validationBatchSize, string warmupRatio, string weightDecay) + { + GradientAccumulationSteps = gradientAccumulationSteps; + LearningRate = learningRate; + LearningRateScheduler = learningRateScheduler; + ModelName = modelName; + NumberOfEpochs = numberOfEpochs; + TrainingBatchSize = trainingBatchSize; + ValidationBatchSize = validationBatchSize; + WarmupRatio = warmupRatio; + WeightDecay = weightDecay; + } + + /// Number of steps to accumulate gradients over before running a backward pass. + public string GradientAccumulationSteps { get; set; } + /// The learning rate for the training procedure. + public string LearningRate { get; set; } + /// The type of learning rate schedule to use during the training procedure. + public string LearningRateScheduler { get; set; } + /// The name of the model to train. + public string ModelName { get; set; } + /// Number of training epochs. + public string NumberOfEpochs { get; set; } + /// The batch size for the training procedure. + public string TrainingBatchSize { get; set; } + /// The batch size to be used during evaluation. + public string ValidationBatchSize { get; set; } + /// The warmup ratio, used alongside LrSchedulerType. + public string WarmupRatio { get; set; } + /// The weight decay for the training procedure. + public string WeightDecay { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.Serialization.cs new file mode 100644 index 0000000000000..a61b3cc78a9bd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class NlpSweepSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EarlyTermination)) + { + if (EarlyTermination != null) + { + writer.WritePropertyName("earlyTermination"u8); + writer.WriteObjectValue(EarlyTermination); + } + else + { + writer.WriteNull("earlyTermination"); + } + } + writer.WritePropertyName("samplingAlgorithm"u8); + writer.WriteStringValue(SamplingAlgorithm.ToString()); + writer.WriteEndObject(); + } + + internal static NlpSweepSettings DeserializeNlpSweepSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional earlyTermination = default; + SamplingAlgorithmType samplingAlgorithm = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("earlyTermination"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + earlyTermination = null; + continue; + } + earlyTermination = MachineLearningEarlyTerminationPolicy.DeserializeMachineLearningEarlyTerminationPolicy(property.Value); + continue; + } + if (property.NameEquals("samplingAlgorithm"u8)) + { + samplingAlgorithm = new SamplingAlgorithmType(property.Value.GetString()); + continue; + } + } + return new NlpSweepSettings(earlyTermination.Value, samplingAlgorithm); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.cs new file mode 100644 index 0000000000000..235f535238010 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpSweepSettings.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Model sweeping and hyperparameter tuning related settings. + public partial class NlpSweepSettings + { + /// Initializes a new instance of NlpSweepSettings. + /// [Required] Type of sampling algorithm. + public NlpSweepSettings(SamplingAlgorithmType samplingAlgorithm) + { + SamplingAlgorithm = samplingAlgorithm; + } + + /// Initializes a new instance of NlpSweepSettings. + /// + /// Type of early termination policy for the sweeping job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// [Required] Type of sampling algorithm. + internal NlpSweepSettings(MachineLearningEarlyTerminationPolicy earlyTermination, SamplingAlgorithmType samplingAlgorithm) + { + EarlyTermination = earlyTermination; + SamplingAlgorithm = samplingAlgorithm; + } + + /// + /// Type of early termination policy for the sweeping job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MachineLearningEarlyTerminationPolicy EarlyTermination { get; set; } + /// [Required] Type of sampling algorithm. + public SamplingAlgorithmType SamplingAlgorithm { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs index 789a2469940d6..e5cc5259db2c2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs @@ -21,6 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("maxConcurrentTrials"u8); writer.WriteNumberValue(MaxConcurrentTrials.Value); } + if (Optional.IsDefined(MaxNodes)) + { + writer.WritePropertyName("maxNodes"u8); + writer.WriteNumberValue(MaxNodes.Value); + } if (Optional.IsDefined(MaxTrials)) { writer.WritePropertyName("maxTrials"u8); @@ -31,6 +36,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("timeout"u8); writer.WriteStringValue(Timeout.Value, "P"); } + if (Optional.IsDefined(TrialTimeout)) + { + writer.WritePropertyName("trialTimeout"u8); + writer.WriteStringValue(TrialTimeout.Value, "P"); + } writer.WriteEndObject(); } @@ -41,8 +51,10 @@ internal static NlpVerticalLimitSettings DeserializeNlpVerticalLimitSettings(Jso return null; } Optional maxConcurrentTrials = default; + Optional maxNodes = default; Optional maxTrials = default; Optional timeout = default; + Optional trialTimeout = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("maxConcurrentTrials"u8)) @@ -54,6 +66,15 @@ internal static NlpVerticalLimitSettings DeserializeNlpVerticalLimitSettings(Jso maxConcurrentTrials = property.Value.GetInt32(); continue; } + if (property.NameEquals("maxNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxNodes = property.Value.GetInt32(); + continue; + } if (property.NameEquals("maxTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -72,8 +93,17 @@ internal static NlpVerticalLimitSettings DeserializeNlpVerticalLimitSettings(Jso timeout = property.Value.GetTimeSpan("P"); continue; } + if (property.NameEquals("trialTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trialTimeout = property.Value.GetTimeSpan("P"); + continue; + } } - return new NlpVerticalLimitSettings(Optional.ToNullable(maxConcurrentTrials), Optional.ToNullable(maxTrials), Optional.ToNullable(timeout)); + return new NlpVerticalLimitSettings(Optional.ToNullable(maxConcurrentTrials), Optional.ToNullable(maxNodes), Optional.ToNullable(maxTrials), Optional.ToNullable(timeout), Optional.ToNullable(trialTimeout)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs index b0c81c484d73f..7ff035a0358a5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs @@ -19,20 +19,28 @@ public NlpVerticalLimitSettings() /// Initializes a new instance of NlpVerticalLimitSettings. /// Maximum Concurrent AutoML iterations. + /// Maximum nodes to use for the experiment. /// Number of AutoML iterations. /// AutoML job timeout. - internal NlpVerticalLimitSettings(int? maxConcurrentTrials, int? maxTrials, TimeSpan? timeout) + /// Timeout for individual HD trials. + internal NlpVerticalLimitSettings(int? maxConcurrentTrials, int? maxNodes, int? maxTrials, TimeSpan? timeout, TimeSpan? trialTimeout) { MaxConcurrentTrials = maxConcurrentTrials; + MaxNodes = maxNodes; MaxTrials = maxTrials; Timeout = timeout; + TrialTimeout = trialTimeout; } /// Maximum Concurrent AutoML iterations. public int? MaxConcurrentTrials { get; set; } + /// Maximum nodes to use for the experiment. + public int? MaxNodes { get; set; } /// Number of AutoML iterations. public int? MaxTrials { get; set; } /// AutoML job timeout. public TimeSpan? Timeout { get; set; } + /// Timeout for individual HD trials. + public TimeSpan? TrialTimeout { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodesValueType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodesValueType.cs new file mode 100644 index 0000000000000..1992062d049b1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodesValueType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The enumerated types for the nodes value. + internal readonly partial struct NodesValueType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NodesValueType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllValue = "All"; + private const string CustomValue = "Custom"; + + /// All. + public static NodesValueType All { get; } = new NodesValueType(AllValue); + /// Custom. + public static NodesValueType Custom { get; } = new NodesValueType(CustomValue); + /// Determines if two values are the same. + public static bool operator ==(NodesValueType left, NodesValueType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NodesValueType left, NodesValueType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NodesValueType(string value) => new NodesValueType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NodesValueType other && Equals(other); + /// + public bool Equals(NodesValueType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs new file mode 100644 index 0000000000000..3cff01d1d3818 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class NotificationSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(EmailOn)) + { + if (EmailOn != null) + { + writer.WritePropertyName("emailOn"u8); + writer.WriteStartArray(); + foreach (var item in EmailOn) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("emailOn"); + } + } + if (Optional.IsCollectionDefined(Emails)) + { + if (Emails != null) + { + writer.WritePropertyName("emails"u8); + writer.WriteStartArray(); + foreach (var item in Emails) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("emails"); + } + } + if (Optional.IsCollectionDefined(Webhooks)) + { + if (Webhooks != null) + { + writer.WritePropertyName("webhooks"u8); + writer.WriteStartObject(); + foreach (var item in Webhooks) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("webhooks"); + } + } + writer.WriteEndObject(); + } + + internal static NotificationSetting DeserializeNotificationSetting(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> emailOn = default; + Optional> emails = default; + Optional> webhooks = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("emailOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + emailOn = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new EmailNotificationEnableType(item.GetString())); + } + emailOn = array; + continue; + } + if (property.NameEquals("emails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + emails = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + emails = array; + continue; + } + if (property.NameEquals("webhooks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + webhooks = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningWebhook.DeserializeMachineLearningWebhook(property0.Value)); + } + webhooks = dictionary; + continue; + } + } + return new NotificationSetting(Optional.ToList(emailOn), Optional.ToList(emails), Optional.ToDictionary(webhooks)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs new file mode 100644 index 0000000000000..1edf7dddc6bdf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Configuration for notification. + public partial class NotificationSetting + { + /// Initializes a new instance of NotificationSetting. + public NotificationSetting() + { + EmailOn = new ChangeTrackingList(); + Emails = new ChangeTrackingList(); + Webhooks = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of NotificationSetting. + /// 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. + /// + /// Send webhook callback to a service. Key is a user-provided name for the webhook. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal NotificationSetting(IList emailOn, IList emails, IDictionary webhooks) + { + EmailOn = emailOn; + Emails = emails; + Webhooks = webhooks; + } + + /// Send email notification to user on specified notification type. + public IList EmailOn { get; set; } + /// This is the email recipient list which has a limitation of 499 characters in total concat with comma separator. + public IList Emails { get; set; } + /// + /// Send webhook callback to a service. Key is a user-provided name for the webhook. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public IDictionary Webhooks { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetric.cs new file mode 100644 index 0000000000000..13e3111d7c0ad --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetric.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The NumericalDataDriftMetric. + public readonly partial struct NumericalDataDriftMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NumericalDataDriftMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JensenShannonDistanceValue = "JensenShannonDistance"; + private const string PopulationStabilityIndexValue = "PopulationStabilityIndex"; + private const string NormalizedWassersteinDistanceValue = "NormalizedWassersteinDistance"; + private const string TwoSampleKolmogorovSmirnovTestValue = "TwoSampleKolmogorovSmirnovTest"; + + /// The Jensen Shannon Distance (JSD) metric. + public static NumericalDataDriftMetric JensenShannonDistance { get; } = new NumericalDataDriftMetric(JensenShannonDistanceValue); + /// The Population Stability Index (PSI) metric. + public static NumericalDataDriftMetric PopulationStabilityIndex { get; } = new NumericalDataDriftMetric(PopulationStabilityIndexValue); + /// The Normalized Wasserstein Distance metric. + public static NumericalDataDriftMetric NormalizedWassersteinDistance { get; } = new NumericalDataDriftMetric(NormalizedWassersteinDistanceValue); + /// The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. + public static NumericalDataDriftMetric TwoSampleKolmogorovSmirnovTest { get; } = new NumericalDataDriftMetric(TwoSampleKolmogorovSmirnovTestValue); + /// Determines if two values are the same. + public static bool operator ==(NumericalDataDriftMetric left, NumericalDataDriftMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NumericalDataDriftMetric left, NumericalDataDriftMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NumericalDataDriftMetric(string value) => new NumericalDataDriftMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NumericalDataDriftMetric other && Equals(other); + /// + public bool Equals(NumericalDataDriftMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..7a122f5e99930 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class NumericalDataDriftMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static NumericalDataDriftMetricThreshold DeserializeNumericalDataDriftMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NumericalDataDriftMetric metric = default; + MonitoringFeatureDataType dataType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new NumericalDataDriftMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new NumericalDataDriftMetricThreshold(dataType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.cs new file mode 100644 index 0000000000000..da556d1c940e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataDriftMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The NumericalDataDriftMetricThreshold. + public partial class NumericalDataDriftMetricThreshold : DataDriftMetricThresholdBase + { + /// Initializes a new instance of NumericalDataDriftMetricThreshold. + /// [Required] The numerical data drift metric to calculate. + public NumericalDataDriftMetricThreshold(NumericalDataDriftMetric metric) + { + Metric = metric; + DataType = MonitoringFeatureDataType.Numerical; + } + + /// Initializes a new instance of NumericalDataDriftMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The numerical data drift metric to calculate. + internal NumericalDataDriftMetricThreshold(MonitoringFeatureDataType dataType, MonitoringThreshold threshold, NumericalDataDriftMetric metric) : base(dataType, threshold) + { + Metric = metric; + DataType = dataType; + } + + /// [Required] The numerical data drift metric to calculate. + public NumericalDataDriftMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetric.cs new file mode 100644 index 0000000000000..96c757e926b98 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetric.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The NumericalDataQualityMetric. + public readonly partial struct NumericalDataQualityMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NumericalDataQualityMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NullValueRateValue = "NullValueRate"; + private const string DataTypeErrorRateValue = "DataTypeErrorRate"; + private const string OutOfBoundsRateValue = "OutOfBoundsRate"; + + /// Calculates the rate of null values. + public static NumericalDataQualityMetric NullValueRate { get; } = new NumericalDataQualityMetric(NullValueRateValue); + /// Calculates the rate of data type errors. + public static NumericalDataQualityMetric DataTypeErrorRate { get; } = new NumericalDataQualityMetric(DataTypeErrorRateValue); + /// Calculates the rate values are out of bounds. + public static NumericalDataQualityMetric OutOfBoundsRate { get; } = new NumericalDataQualityMetric(OutOfBoundsRateValue); + /// Determines if two values are the same. + public static bool operator ==(NumericalDataQualityMetric left, NumericalDataQualityMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NumericalDataQualityMetric left, NumericalDataQualityMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NumericalDataQualityMetric(string value) => new NumericalDataQualityMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NumericalDataQualityMetric other && Equals(other); + /// + public bool Equals(NumericalDataQualityMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..2ce284b2b40b6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class NumericalDataQualityMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static NumericalDataQualityMetricThreshold DeserializeNumericalDataQualityMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NumericalDataQualityMetric metric = default; + MonitoringFeatureDataType dataType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new NumericalDataQualityMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new NumericalDataQualityMetricThreshold(dataType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.cs new file mode 100644 index 0000000000000..1ca86df8a4fae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalDataQualityMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The NumericalDataQualityMetricThreshold. + public partial class NumericalDataQualityMetricThreshold : DataQualityMetricThresholdBase + { + /// Initializes a new instance of NumericalDataQualityMetricThreshold. + /// [Required] The numerical data quality metric to calculate. + public NumericalDataQualityMetricThreshold(NumericalDataQualityMetric metric) + { + Metric = metric; + DataType = MonitoringFeatureDataType.Numerical; + } + + /// Initializes a new instance of NumericalDataQualityMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The numerical data quality metric to calculate. + internal NumericalDataQualityMetricThreshold(MonitoringFeatureDataType dataType, MonitoringThreshold threshold, NumericalDataQualityMetric metric) : base(dataType, threshold) + { + Metric = metric; + DataType = dataType; + } + + /// [Required] The numerical data quality metric to calculate. + public NumericalDataQualityMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetric.cs new file mode 100644 index 0000000000000..4bb1fd0848707 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetric.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The NumericalPredictionDriftMetric. + public readonly partial struct NumericalPredictionDriftMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NumericalPredictionDriftMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JensenShannonDistanceValue = "JensenShannonDistance"; + private const string PopulationStabilityIndexValue = "PopulationStabilityIndex"; + private const string NormalizedWassersteinDistanceValue = "NormalizedWassersteinDistance"; + private const string TwoSampleKolmogorovSmirnovTestValue = "TwoSampleKolmogorovSmirnovTest"; + + /// The Jensen Shannon Distance (JSD) metric. + public static NumericalPredictionDriftMetric JensenShannonDistance { get; } = new NumericalPredictionDriftMetric(JensenShannonDistanceValue); + /// The Population Stability Index (PSI) metric. + public static NumericalPredictionDriftMetric PopulationStabilityIndex { get; } = new NumericalPredictionDriftMetric(PopulationStabilityIndexValue); + /// The Normalized Wasserstein Distance metric. + public static NumericalPredictionDriftMetric NormalizedWassersteinDistance { get; } = new NumericalPredictionDriftMetric(NormalizedWassersteinDistanceValue); + /// The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. + public static NumericalPredictionDriftMetric TwoSampleKolmogorovSmirnovTest { get; } = new NumericalPredictionDriftMetric(TwoSampleKolmogorovSmirnovTestValue); + /// Determines if two values are the same. + public static bool operator ==(NumericalPredictionDriftMetric left, NumericalPredictionDriftMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NumericalPredictionDriftMetric left, NumericalPredictionDriftMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NumericalPredictionDriftMetric(string value) => new NumericalPredictionDriftMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NumericalPredictionDriftMetric other && Equals(other); + /// + public bool Equals(NumericalPredictionDriftMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..43c718456a4a6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class NumericalPredictionDriftMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static NumericalPredictionDriftMetricThreshold DeserializeNumericalPredictionDriftMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NumericalPredictionDriftMetric metric = default; + MonitoringFeatureDataType dataType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new NumericalPredictionDriftMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new NumericalPredictionDriftMetricThreshold(dataType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.cs new file mode 100644 index 0000000000000..bdf26a5c7789a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NumericalPredictionDriftMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The NumericalPredictionDriftMetricThreshold. + public partial class NumericalPredictionDriftMetricThreshold : PredictionDriftMetricThresholdBase + { + /// Initializes a new instance of NumericalPredictionDriftMetricThreshold. + /// [Required] The numerical prediction drift metric to calculate. + public NumericalPredictionDriftMetricThreshold(NumericalPredictionDriftMetric metric) + { + Metric = metric; + DataType = MonitoringFeatureDataType.Numerical; + } + + /// Initializes a new instance of NumericalPredictionDriftMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The numerical prediction drift metric to calculate. + internal NumericalPredictionDriftMetricThreshold(MonitoringFeatureDataType dataType, MonitoringThreshold threshold, NumericalPredictionDriftMetric metric) : base(dataType, threshold) + { + Metric = metric; + DataType = dataType; + } + + /// [Required] The numerical prediction drift metric to calculate. + public NumericalPredictionDriftMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs new file mode 100644 index 0000000000000..21585b9fc7857 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class OneLakeArtifact : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("artifactName"u8); + writer.WriteStringValue(ArtifactName); + writer.WritePropertyName("artifactType"u8); + writer.WriteStringValue(ArtifactType.ToString()); + writer.WriteEndObject(); + } + + internal static OneLakeArtifact DeserializeOneLakeArtifact(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("artifactType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "LakeHouse": return LakeHouseArtifact.DeserializeLakeHouseArtifact(element); + } + } + return UnknownOneLakeArtifact.DeserializeUnknownOneLakeArtifact(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs new file mode 100644 index 0000000000000..94a886f20fbf6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// OneLake artifact (data source) configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class OneLakeArtifact + { + /// Initializes a new instance of OneLakeArtifact. + /// [Required] OneLake artifact name. + /// is null. + protected OneLakeArtifact(string artifactName) + { + Argument.AssertNotNull(artifactName, nameof(artifactName)); + + ArtifactName = artifactName; + } + + /// Initializes a new instance of OneLakeArtifact. + /// [Required] OneLake artifact name. + /// [Required] OneLake artifact type. + internal OneLakeArtifact(string artifactName, OneLakeArtifactType artifactType) + { + ArtifactName = artifactName; + ArtifactType = artifactType; + } + + /// [Required] OneLake artifact name. + public string ArtifactName { get; set; } + /// [Required] OneLake artifact type. + internal OneLakeArtifactType ArtifactType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifactType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifactType.cs new file mode 100644 index 0000000000000..998f4829a6a23 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifactType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine OneLake artifact type. + internal readonly partial struct OneLakeArtifactType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OneLakeArtifactType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LakeHouseValue = "LakeHouse"; + + /// LakeHouse. + public static OneLakeArtifactType LakeHouse { get; } = new OneLakeArtifactType(LakeHouseValue); + /// Determines if two values are the same. + public static bool operator ==(OneLakeArtifactType left, OneLakeArtifactType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OneLakeArtifactType left, OneLakeArtifactType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OneLakeArtifactType(string value) => new OneLakeArtifactType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OneLakeArtifactType other && Equals(other); + /// + public bool Equals(OneLakeArtifactType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs new file mode 100644 index 0000000000000..0394da8323cef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class OneLakeDatastore : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("artifact"u8); + writer.WriteObjectValue(Artifact); + if (Optional.IsDefined(Endpoint)) + { + if (Endpoint != null) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + else + { + writer.WriteNull("endpoint"); + } + } + writer.WritePropertyName("oneLakeWorkspaceName"u8); + writer.WriteStringValue(OneLakeWorkspaceName); + if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) + { + writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); + writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); + } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("datastoreType"u8); + writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(IntellectualProperty)) + { + if (IntellectualProperty != null) + { + writer.WritePropertyName("intellectualProperty"u8); + writer.WriteObjectValue(IntellectualProperty); + } + else + { + writer.WriteNull("intellectualProperty"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OneLakeArtifact artifact = default; + Optional endpoint = default; + string oneLakeWorkspaceName = default; + Optional serviceDataAccessAuthIdentity = default; + MachineLearningDatastoreCredentials credentials = default; + DatastoreType datastoreType = default; + Optional intellectualProperty = default; + Optional isDefault = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("artifact"u8)) + { + artifact = OneLakeArtifact.DeserializeOneLakeArtifact(property.Value); + continue; + } + if (property.NameEquals("endpoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endpoint = null; + continue; + } + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("oneLakeWorkspaceName"u8)) + { + oneLakeWorkspaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceDataAccessAuthIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); + continue; + } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("datastoreType"u8)) + { + datastoreType = new DatastoreType(property.Value.GetString()); + continue; + } + if (property.NameEquals("intellectualProperty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + intellectualProperty = null; + continue; + } + intellectualProperty = IntellectualProperty.DeserializeIntellectualProperty(property.Value); + continue; + } + if (property.NameEquals("isDefault"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new OneLakeDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, intellectualProperty.Value, Optional.ToNullable(isDefault), artifact, endpoint.Value, oneLakeWorkspaceName, Optional.ToNullable(serviceDataAccessAuthIdentity)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs new file mode 100644 index 0000000000000..fdb4c278d5150 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// OneLake (Trident) datastore configuration. + public partial class OneLakeDatastore : MachineLearningDatastoreProperties + { + /// Initializes a new instance of OneLakeDatastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// + /// [Required] OneLake artifact backing the datastore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// [Required] OneLake workspace name. + /// , or is null. + public OneLakeDatastore(MachineLearningDatastoreCredentials credentials, OneLakeArtifact artifact, string oneLakeWorkspaceName) : base(credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + Argument.AssertNotNull(artifact, nameof(artifact)); + Argument.AssertNotNull(oneLakeWorkspaceName, nameof(oneLakeWorkspaceName)); + + Artifact = artifact; + OneLakeWorkspaceName = oneLakeWorkspaceName; + DatastoreType = DatastoreType.OneLake; + } + + /// Initializes a new instance of OneLakeDatastore. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// [Required] Storage type backing the datastore. + /// Intellectual Property details. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] OneLake artifact backing the datastore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// OneLake endpoint to use for the datastore. + /// [Required] OneLake workspace name. + /// Indicates which identity to use to authenticate service data access to customer's storage. + internal OneLakeDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, IntellectualProperty intellectualProperty, bool? isDefault, OneLakeArtifact artifact, string endpoint, string oneLakeWorkspaceName, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, intellectualProperty, isDefault) + { + Artifact = artifact; + Endpoint = endpoint; + OneLakeWorkspaceName = oneLakeWorkspaceName; + ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + DatastoreType = datastoreType; + } + + /// + /// [Required] OneLake artifact backing the datastore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public OneLakeArtifact Artifact { get; set; } + /// OneLake endpoint to use for the datastore. + public string Endpoint { get; set; } + /// [Required] OneLake workspace name. + public string OneLakeWorkspaceName { get; set; } + /// Indicates which identity to use to authenticate service data access to customer's storage. + public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.Serialization.cs new file mode 100644 index 0000000000000..b5de221114a66 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class OnlineInferenceConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Configurations)) + { + if (Configurations != null) + { + writer.WritePropertyName("configurations"u8); + writer.WriteStartObject(); + foreach (var item in Configurations) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("configurations"); + } + } + if (Optional.IsDefined(EntryScript)) + { + if (EntryScript != null) + { + writer.WritePropertyName("entryScript"u8); + writer.WriteStringValue(EntryScript); + } + else + { + writer.WriteNull("entryScript"); + } + } + if (Optional.IsDefined(LivenessRoute)) + { + if (LivenessRoute != null) + { + writer.WritePropertyName("livenessRoute"u8); + writer.WriteObjectValue(LivenessRoute); + } + else + { + writer.WriteNull("livenessRoute"); + } + } + if (Optional.IsDefined(ReadinessRoute)) + { + if (ReadinessRoute != null) + { + writer.WritePropertyName("readinessRoute"u8); + writer.WriteObjectValue(ReadinessRoute); + } + else + { + writer.WriteNull("readinessRoute"); + } + } + if (Optional.IsDefined(ScoringRoute)) + { + if (ScoringRoute != null) + { + writer.WritePropertyName("scoringRoute"u8); + writer.WriteObjectValue(ScoringRoute); + } + else + { + writer.WriteNull("scoringRoute"); + } + } + writer.WriteEndObject(); + } + + internal static OnlineInferenceConfiguration DeserializeOnlineInferenceConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> configurations = default; + Optional entryScript = default; + Optional livenessRoute = default; + Optional readinessRoute = default; + Optional scoringRoute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + configurations = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + configurations = dictionary; + continue; + } + if (property.NameEquals("entryScript"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + entryScript = null; + continue; + } + entryScript = property.Value.GetString(); + continue; + } + if (property.NameEquals("livenessRoute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + livenessRoute = null; + continue; + } + livenessRoute = MachineLearningInferenceContainerRoute.DeserializeMachineLearningInferenceContainerRoute(property.Value); + continue; + } + if (property.NameEquals("readinessRoute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + readinessRoute = null; + continue; + } + readinessRoute = MachineLearningInferenceContainerRoute.DeserializeMachineLearningInferenceContainerRoute(property.Value); + continue; + } + if (property.NameEquals("scoringRoute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scoringRoute = null; + continue; + } + scoringRoute = MachineLearningInferenceContainerRoute.DeserializeMachineLearningInferenceContainerRoute(property.Value); + continue; + } + } + return new OnlineInferenceConfiguration(Optional.ToDictionary(configurations), entryScript.Value, livenessRoute.Value, readinessRoute.Value, scoringRoute.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.cs new file mode 100644 index 0000000000000..d017011d987c7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineInferenceConfiguration.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Online inference configuration options. + public partial class OnlineInferenceConfiguration + { + /// Initializes a new instance of OnlineInferenceConfiguration. + public OnlineInferenceConfiguration() + { + Configurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of OnlineInferenceConfiguration. + /// Additional configurations. + /// Entry script or command to invoke. + /// The route to check the liveness of the inference server container. + /// The route to check the readiness of the inference server container. + /// The port to send the scoring requests to, within the inference server container. + internal OnlineInferenceConfiguration(IDictionary configurations, string entryScript, MachineLearningInferenceContainerRoute livenessRoute, MachineLearningInferenceContainerRoute readinessRoute, MachineLearningInferenceContainerRoute scoringRoute) + { + Configurations = configurations; + EntryScript = entryScript; + LivenessRoute = livenessRoute; + ReadinessRoute = readinessRoute; + ScoringRoute = scoringRoute; + } + + /// Additional configurations. + public IDictionary Configurations { get; set; } + /// Entry script or command to invoke. + public string EntryScript { get; set; } + /// The route to check the liveness of the inference server container. + public MachineLearningInferenceContainerRoute LivenessRoute { get; set; } + /// The route to check the readiness of the inference server container. + public MachineLearningInferenceContainerRoute ReadinessRoute { get; set; } + /// The port to send the scoring requests to, within the inference server container. + public MachineLearningInferenceContainerRoute ScoringRoute { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleCategory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleCategory.cs new file mode 100644 index 0000000000000..4da832e1d42ac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleCategory.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Category of a managed network Outbound Rule of a machine learning workspace. + public readonly partial struct OutboundRuleCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OutboundRuleCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequiredValue = "Required"; + private const string RecommendedValue = "Recommended"; + private const string UserDefinedValue = "UserDefined"; + + /// Required. + public static OutboundRuleCategory Required { get; } = new OutboundRuleCategory(RequiredValue); + /// Recommended. + public static OutboundRuleCategory Recommended { get; } = new OutboundRuleCategory(RecommendedValue); + /// UserDefined. + public static OutboundRuleCategory UserDefined { get; } = new OutboundRuleCategory(UserDefinedValue); + /// Determines if two values are the same. + public static bool operator ==(OutboundRuleCategory left, OutboundRuleCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OutboundRuleCategory left, OutboundRuleCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OutboundRuleCategory(string value) => new OutboundRuleCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OutboundRuleCategory other && Equals(other); + /// + public bool Equals(OutboundRuleCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.Serialization.cs new file mode 100644 index 0000000000000..51690f7438eac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class OutboundRuleListResult + { + internal static OutboundRuleListResult DeserializeOutboundRuleListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningOutboundRuleBasicData.DeserializeMachineLearningOutboundRuleBasicData(item)); + } + value = array; + continue; + } + } + return new OutboundRuleListResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.cs new file mode 100644 index 0000000000000..e8f8016ddc2cd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// List of outbound rules for the managed network of a machine learning workspace. + internal partial class OutboundRuleListResult + { + /// Initializes a new instance of OutboundRuleListResult. + internal OutboundRuleListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of OutboundRuleListResult. + /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. + /// 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. + internal OutboundRuleListResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. + public string NextLink { get; } + /// 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. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleStatus.cs new file mode 100644 index 0000000000000..4ff196e9491db --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Type of a managed network Outbound Rule of a machine learning workspace. + public readonly partial struct OutboundRuleStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OutboundRuleStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InactiveValue = "Inactive"; + private const string ActiveValue = "Active"; + + /// Inactive. + public static OutboundRuleStatus Inactive { get; } = new OutboundRuleStatus(InactiveValue); + /// Active. + public static OutboundRuleStatus Active { get; } = new OutboundRuleStatus(ActiveValue); + /// Determines if two values are the same. + public static bool operator ==(OutboundRuleStatus left, OutboundRuleStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OutboundRuleStatus left, OutboundRuleStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OutboundRuleStatus(string value) => new OutboundRuleStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OutboundRuleStatus other && Equals(other); + /// + public bool Equals(OutboundRuleStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleType.cs new file mode 100644 index 0000000000000..0e84f22f0a077 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutboundRuleType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Type of a managed network Outbound Rule of a machine learning workspace. + internal readonly partial struct OutboundRuleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OutboundRuleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FqdnValue = "FQDN"; + private const string PrivateEndpointValue = "PrivateEndpoint"; + private const string ServiceTagValue = "ServiceTag"; + + /// FQDN. + public static OutboundRuleType Fqdn { get; } = new OutboundRuleType(FqdnValue); + /// PrivateEndpoint. + public static OutboundRuleType PrivateEndpoint { get; } = new OutboundRuleType(PrivateEndpointValue); + /// ServiceTag. + public static OutboundRuleType ServiceTag { get; } = new OutboundRuleType(ServiceTagValue); + /// Determines if two values are the same. + public static bool operator ==(OutboundRuleType left, OutboundRuleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OutboundRuleType left, OutboundRuleType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OutboundRuleType(string value) => new OutboundRuleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OutboundRuleType other && Equals(other); + /// + public bool Equals(OutboundRuleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageBuildState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageBuildState.cs new file mode 100644 index 0000000000000..0adc706b21f25 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageBuildState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Package build state returned in package response. + public readonly partial struct PackageBuildState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PackageBuildState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string RunningValue = "Running"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// NotStarted. + public static PackageBuildState NotStarted { get; } = new PackageBuildState(NotStartedValue); + /// Running. + public static PackageBuildState Running { get; } = new PackageBuildState(RunningValue); + /// Succeeded. + public static PackageBuildState Succeeded { get; } = new PackageBuildState(SucceededValue); + /// Failed. + public static PackageBuildState Failed { get; } = new PackageBuildState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(PackageBuildState left, PackageBuildState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PackageBuildState left, PackageBuildState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PackageBuildState(string value) => new PackageBuildState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PackageBuildState other && Equals(other); + /// + public bool Equals(PackageBuildState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputDeliveryMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputDeliveryMode.cs new file mode 100644 index 0000000000000..5e5594e252a56 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputDeliveryMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Mounting type of the model or the inputs. + public readonly partial struct PackageInputDeliveryMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PackageInputDeliveryMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CopyValue = "Copy"; + private const string DownloadValue = "Download"; + + /// Copy. + public static PackageInputDeliveryMode Copy { get; } = new PackageInputDeliveryMode(CopyValue); + /// Download. + public static PackageInputDeliveryMode Download { get; } = new PackageInputDeliveryMode(DownloadValue); + /// Determines if two values are the same. + public static bool operator ==(PackageInputDeliveryMode left, PackageInputDeliveryMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PackageInputDeliveryMode left, PackageInputDeliveryMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PackageInputDeliveryMode(string value) => new PackageInputDeliveryMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PackageInputDeliveryMode other && Equals(other); + /// + public bool Equals(PackageInputDeliveryMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.Serialization.cs new file mode 100644 index 0000000000000..36ff32d708a63 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PackageInputPathBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("inputPathType"u8); + writer.WriteStringValue(InputPathType.ToString()); + writer.WriteEndObject(); + } + + internal static PackageInputPathBase DeserializePackageInputPathBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("inputPathType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "PathId": return PackageInputPathId.DeserializePackageInputPathId(element); + case "PathVersion": return PackageInputPathVersion.DeserializePackageInputPathVersion(element); + case "Url": return PackageInputPathUri.DeserializePackageInputPathUri(element); + } + } + return UnknownPackageInputPathBase.DeserializeUnknownPackageInputPathBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.cs new file mode 100644 index 0000000000000..40851cee083dc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathBase.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The PackageInputPathBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class PackageInputPathBase + { + /// Initializes a new instance of PackageInputPathBase. + protected PackageInputPathBase() + { + } + + /// Initializes a new instance of PackageInputPathBase. + /// [Required] Input path type for package inputs. + internal PackageInputPathBase(InputPathType inputPathType) + { + InputPathType = inputPathType; + } + + /// [Required] Input path type for package inputs. + internal InputPathType InputPathType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.Serialization.cs new file mode 100644 index 0000000000000..30635c3bf5b56 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PackageInputPathId : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + writer.WritePropertyName("inputPathType"u8); + writer.WriteStringValue(InputPathType.ToString()); + writer.WriteEndObject(); + } + + internal static PackageInputPathId DeserializePackageInputPathId(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceId = default; + InputPathType inputPathType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputPathType"u8)) + { + inputPathType = new InputPathType(property.Value.GetString()); + continue; + } + } + return new PackageInputPathId(inputPathType, resourceId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.cs new file mode 100644 index 0000000000000..0d4ad2564998f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathId.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Package input path specified with a resource id. + public partial class PackageInputPathId : PackageInputPathBase + { + /// Initializes a new instance of PackageInputPathId. + public PackageInputPathId() + { + InputPathType = InputPathType.PathId; + } + + /// Initializes a new instance of PackageInputPathId. + /// [Required] Input path type for package inputs. + /// Input resource id. + internal PackageInputPathId(InputPathType inputPathType, ResourceIdentifier resourceId) : base(inputPathType) + { + ResourceId = resourceId; + InputPathType = inputPathType; + } + + /// Input resource id. + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.Serialization.cs new file mode 100644 index 0000000000000..0781f87b3beef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PackageInputPathUri : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("url"); + } + } + writer.WritePropertyName("inputPathType"u8); + writer.WriteStringValue(InputPathType.ToString()); + writer.WriteEndObject(); + } + + internal static PackageInputPathUri DeserializePackageInputPathUri(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional url = default; + InputPathType inputPathType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + url = null; + continue; + } + url = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputPathType"u8)) + { + inputPathType = new InputPathType(property.Value.GetString()); + continue; + } + } + return new PackageInputPathUri(inputPathType, url.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.cs new file mode 100644 index 0000000000000..f89292b8508b1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathUri.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Package input path specified as an url. + public partial class PackageInputPathUri : PackageInputPathBase + { + /// Initializes a new instance of PackageInputPathUri. + public PackageInputPathUri() + { + InputPathType = InputPathType.Url; + } + + /// Initializes a new instance of PackageInputPathUri. + /// [Required] Input path type for package inputs. + /// Input path url. + internal PackageInputPathUri(InputPathType inputPathType, Uri uri) : base(inputPathType) + { + Uri = uri; + InputPathType = inputPathType; + } + + /// Input path url. + public Uri Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.Serialization.cs new file mode 100644 index 0000000000000..80482b74d5b7d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.Serialization.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PackageInputPathVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceName)) + { + if (ResourceName != null) + { + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + } + else + { + writer.WriteNull("resourceName"); + } + } + if (Optional.IsDefined(ResourceVersion)) + { + if (ResourceVersion != null) + { + writer.WritePropertyName("resourceVersion"u8); + writer.WriteStringValue(ResourceVersion); + } + else + { + writer.WriteNull("resourceVersion"); + } + } + writer.WritePropertyName("inputPathType"u8); + writer.WriteStringValue(InputPathType.ToString()); + writer.WriteEndObject(); + } + + internal static PackageInputPathVersion DeserializePackageInputPathVersion(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceName = default; + Optional resourceVersion = default; + InputPathType inputPathType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceName = null; + continue; + } + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceVersion = null; + continue; + } + resourceVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputPathType"u8)) + { + inputPathType = new InputPathType(property.Value.GetString()); + continue; + } + } + return new PackageInputPathVersion(inputPathType, resourceName.Value, resourceVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.cs new file mode 100644 index 0000000000000..b59929577aa07 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputPathVersion.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Package input path specified with name and version. + public partial class PackageInputPathVersion : PackageInputPathBase + { + /// Initializes a new instance of PackageInputPathVersion. + public PackageInputPathVersion() + { + InputPathType = InputPathType.PathVersion; + } + + /// Initializes a new instance of PackageInputPathVersion. + /// [Required] Input path type for package inputs. + /// Input resource name. + /// Input resource version. + internal PackageInputPathVersion(InputPathType inputPathType, string resourceName, string resourceVersion) : base(inputPathType) + { + ResourceName = resourceName; + ResourceVersion = resourceVersion; + InputPathType = inputPathType; + } + + /// Input resource name. + public string ResourceName { get; set; } + /// Input resource version. + public string ResourceVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputType.cs new file mode 100644 index 0000000000000..2fcc93a0161ee --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PackageInputType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Type of the inputs. + public readonly partial struct PackageInputType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PackageInputType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UriFileValue = "UriFile"; + private const string UriFolderValue = "UriFolder"; + + /// UriFile. + public static PackageInputType UriFile { get; } = new PackageInputType(UriFileValue); + /// UriFolder. + public static PackageInputType UriFolder { get; } = new PackageInputType(UriFolderValue); + /// Determines if two values are the same. + public static bool operator ==(PackageInputType left, PackageInputType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PackageInputType left, PackageInputType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PackageInputType(string value) => new PackageInputType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PackageInputType other && Equals(other); + /// + public bool Equals(PackageInputType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.Serialization.cs new file mode 100644 index 0000000000000..39ab5dadd4ba4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class PartialJobBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.cs new file mode 100644 index 0000000000000..d4209216ab1f8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialJobBase.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Mutable base definition for a job. + internal partial class PartialJobBase + { + /// Initializes a new instance of PartialJobBase. + public PartialJobBase() + { + } + + /// Mutable notification setting for the job. + internal PartialNotificationSetting NotificationSetting { get; set; } + /// + /// Send webhook callback to a service. Key is a user-provided name for the webhook. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public IDictionary NotificationSettingWebhooks + { + get => NotificationSetting is null ? default : NotificationSetting.Webhooks; + set + { + if (NotificationSetting is null) + NotificationSetting = new PartialNotificationSetting(); + NotificationSetting.Webhooks = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.Serialization.cs new file mode 100644 index 0000000000000..b557ee9d2de2d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class PartialNotificationSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Webhooks)) + { + if (Webhooks != null) + { + writer.WritePropertyName("webhooks"u8); + writer.WriteStartObject(); + foreach (var item in Webhooks) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("webhooks"); + } + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.cs new file mode 100644 index 0000000000000..5ab6d65110b25 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialNotificationSetting.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Mutable configuration for notification. + internal partial class PartialNotificationSetting + { + /// Initializes a new instance of PartialNotificationSetting. + public PartialNotificationSetting() + { + Webhooks = new ChangeTrackingDictionary(); + } + + /// + /// Send webhook callback to a service. Key is a user-provided name for the webhook. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public IDictionary Webhooks { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.Serialization.cs new file mode 100644 index 0000000000000..1401fe5acf25c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PendingUploadCredentialDto + { + internal static PendingUploadCredentialDto DeserializePendingUploadCredentialDto(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("credentialType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SAS": return SasCredentialDto.DeserializeSasCredentialDto(element); + } + } + return UnknownPendingUploadCredentialDto.DeserializeUnknownPendingUploadCredentialDto(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.cs new file mode 100644 index 0000000000000..3bd6c65472d20 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialDto.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The PendingUploadCredentialDto. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class PendingUploadCredentialDto + { + /// Initializes a new instance of PendingUploadCredentialDto. + protected PendingUploadCredentialDto() + { + } + + /// Initializes a new instance of PendingUploadCredentialDto. + /// [Required] Credential type used to authentication with storage. + internal PendingUploadCredentialDto(PendingUploadCredentialType credentialType) + { + CredentialType = credentialType; + } + + /// [Required] Credential type used to authentication with storage. + internal PendingUploadCredentialType CredentialType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialType.cs new file mode 100644 index 0000000000000..0b228b06d722a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadCredentialType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Enum to determine the PendingUpload credentials type. + internal readonly partial struct PendingUploadCredentialType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PendingUploadCredentialType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SasValue = "SAS"; + + /// SAS. + public static PendingUploadCredentialType Sas { get; } = new PendingUploadCredentialType(SasValue); + /// Determines if two values are the same. + public static bool operator ==(PendingUploadCredentialType left, PendingUploadCredentialType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PendingUploadCredentialType left, PendingUploadCredentialType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PendingUploadCredentialType(string value) => new PendingUploadCredentialType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PendingUploadCredentialType other && Equals(other); + /// + public bool Equals(PendingUploadCredentialType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.Serialization.cs new file mode 100644 index 0000000000000..3c854c2cac6ca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PendingUploadRequestDto : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PendingUploadId)) + { + if (PendingUploadId != null) + { + writer.WritePropertyName("pendingUploadId"u8); + writer.WriteStringValue(PendingUploadId); + } + else + { + writer.WriteNull("pendingUploadId"); + } + } + if (Optional.IsDefined(PendingUploadType)) + { + writer.WritePropertyName("pendingUploadType"u8); + writer.WriteStringValue(PendingUploadType.Value.ToString()); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.cs new file mode 100644 index 0000000000000..fed670402dca9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadRequestDto.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The PendingUploadRequestDto. + public partial class PendingUploadRequestDto + { + /// Initializes a new instance of PendingUploadRequestDto. + public PendingUploadRequestDto() + { + } + + /// If PendingUploadId = null then random guid will be used. + public string PendingUploadId { get; set; } + /// TemporaryBlobReference is the only supported type. + public PendingUploadType? PendingUploadType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.Serialization.cs new file mode 100644 index 0000000000000..1794e133c210c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PendingUploadResponseDto + { + internal static PendingUploadResponseDto DeserializePendingUploadResponseDto(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional blobReferenceForConsumption = default; + Optional pendingUploadId = default; + Optional pendingUploadType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blobReferenceForConsumption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + blobReferenceForConsumption = null; + continue; + } + blobReferenceForConsumption = BlobReferenceForConsumptionDto.DeserializeBlobReferenceForConsumptionDto(property.Value); + continue; + } + if (property.NameEquals("pendingUploadId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + pendingUploadId = null; + continue; + } + pendingUploadId = property.Value.GetString(); + continue; + } + if (property.NameEquals("pendingUploadType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pendingUploadType = new PendingUploadType(property.Value.GetString()); + continue; + } + } + return new PendingUploadResponseDto(blobReferenceForConsumption.Value, pendingUploadId.Value, Optional.ToNullable(pendingUploadType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.cs new file mode 100644 index 0000000000000..12828feb8d526 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadResponseDto.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The PendingUploadResponseDto. + public partial class PendingUploadResponseDto + { + /// Initializes a new instance of PendingUploadResponseDto. + internal PendingUploadResponseDto() + { + } + + /// Initializes a new instance of PendingUploadResponseDto. + /// Container level read, write, list SAS. + /// ID for this upload request. + /// TemporaryBlobReference is the only supported type. + internal PendingUploadResponseDto(BlobReferenceForConsumptionDto blobReferenceForConsumption, string pendingUploadId, PendingUploadType? pendingUploadType) + { + BlobReferenceForConsumption = blobReferenceForConsumption; + PendingUploadId = pendingUploadId; + PendingUploadType = pendingUploadType; + } + + /// Container level read, write, list SAS. + public BlobReferenceForConsumptionDto BlobReferenceForConsumption { get; } + /// ID for this upload request. + public string PendingUploadId { get; } + /// TemporaryBlobReference is the only supported type. + public PendingUploadType? PendingUploadType { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadType.cs new file mode 100644 index 0000000000000..9da24d66ed378 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PendingUploadType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Type of storage to use for the pending upload location. + public readonly partial struct PendingUploadType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PendingUploadType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string TemporaryBlobReferenceValue = "TemporaryBlobReference"; + + /// None. + public static PendingUploadType None { get; } = new PendingUploadType(NoneValue); + /// TemporaryBlobReference. + public static PendingUploadType TemporaryBlobReference { get; } = new PendingUploadType(TemporaryBlobReferenceValue); + /// Determines if two values are the same. + public static bool operator ==(PendingUploadType left, PendingUploadType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PendingUploadType left, PendingUploadType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PendingUploadType(string value) => new PendingUploadType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PendingUploadType other && Equals(other); + /// + public bool Equals(PendingUploadType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..1f845a97bbfe2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PredictionDriftMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static PredictionDriftMetricThresholdBase DeserializePredictionDriftMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("dataType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Categorical": return CategoricalPredictionDriftMetricThreshold.DeserializeCategoricalPredictionDriftMetricThreshold(element); + case "Numerical": return NumericalPredictionDriftMetricThreshold.DeserializeNumericalPredictionDriftMetricThreshold(element); + } + } + return UnknownPredictionDriftMetricThresholdBase.DeserializeUnknownPredictionDriftMetricThresholdBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.cs new file mode 100644 index 0000000000000..9d63a9f52bcdc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMetricThresholdBase.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The PredictionDriftMetricThresholdBase. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class PredictionDriftMetricThresholdBase + { + /// Initializes a new instance of PredictionDriftMetricThresholdBase. + protected PredictionDriftMetricThresholdBase() + { + } + + /// Initializes a new instance of PredictionDriftMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal PredictionDriftMetricThresholdBase(MonitoringFeatureDataType dataType, MonitoringThreshold threshold) + { + DataType = dataType; + Threshold = threshold; + } + + /// [Required] Specifies the data type of the metric threshold. + internal MonitoringFeatureDataType DataType { get; set; } + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal MonitoringThreshold Threshold { get; set; } + /// The threshold value. If null, the set default is dependent on the metric type. + public double? ThresholdValue + { + get => Threshold is null ? default : Threshold.Value; + set + { + if (Threshold is null) + Threshold = new MonitoringThreshold(); + Threshold.Value = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs new file mode 100644 index 0000000000000..fc0a774c0305d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PredictionDriftMonitoringSignal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metricThresholds"u8); + writer.WriteStartArray(); + foreach (var item in MetricThresholds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("modelType"u8); + writer.WriteStringValue(ModelType.ToString()); + writer.WritePropertyName("productionData"u8); + writer.WriteObjectValue(ProductionData); + writer.WritePropertyName("referenceData"u8); + writer.WriteObjectValue(ReferenceData); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static PredictionDriftMonitoringSignal DeserializePredictionDriftMonitoringSignal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList metricThresholds = default; + MonitoringModelType modelType = default; + MonitoringInputDataBase productionData = default; + MonitoringInputDataBase referenceData = default; + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metricThresholds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PredictionDriftMetricThresholdBase.DeserializePredictionDriftMetricThresholdBase(item)); + } + metricThresholds = array; + continue; + } + if (property.NameEquals("modelType"u8)) + { + modelType = new MonitoringModelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("productionData"u8)) + { + productionData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("referenceData"u8)) + { + referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new PredictionDriftMonitoringSignal(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType, metricThresholds, modelType, productionData, referenceData); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs new file mode 100644 index 0000000000000..22ada1c01a54e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The PredictionDriftMonitoringSignal. + public partial class PredictionDriftMonitoringSignal : MonitoringSignalBase + { + /// Initializes a new instance of PredictionDriftMonitoringSignal. + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// [Required] The type of the model monitored. + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// , or is null. + public PredictionDriftMonitoringSignal(IEnumerable metricThresholds, MonitoringModelType modelType, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) + { + Argument.AssertNotNull(metricThresholds, nameof(metricThresholds)); + Argument.AssertNotNull(productionData, nameof(productionData)); + Argument.AssertNotNull(referenceData, nameof(referenceData)); + + MetricThresholds = metricThresholds.ToList(); + ModelType = modelType; + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = MonitoringSignalType.PredictionDrift; + } + + /// Initializes a new instance of PredictionDriftMonitoringSignal. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// [Required] The type of the model monitored. + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal PredictionDriftMonitoringSignal(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType, IList metricThresholds, MonitoringModelType modelType, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) : base(mode, properties, signalType) + { + MetricThresholds = metricThresholds; + ModelType = modelType; + ProductionData = productionData; + ReferenceData = referenceData; + SignalType = signalType; + } + + /// + /// [Required] A list of metrics to calculate and their associated thresholds. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public IList MetricThresholds { get; } + /// [Required] The type of the model monitored. + public MonitoringModelType ModelType { get; set; } + /// + /// [Required] The data which drift will be calculated for. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ProductionData { get; set; } + /// + /// [Required] The data to calculate drift against. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MonitoringInputDataBase ReferenceData { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.Serialization.cs new file mode 100644 index 0000000000000..a8ed691c05584 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PrivateEndpointBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static PrivateEndpointBase DeserializePrivateEndpointBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new PrivateEndpointBase(id.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.cs new file mode 100644 index 0000000000000..4a615a9e59799 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointBase.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The Private Endpoint resource. + public partial class PrivateEndpointBase + { + /// Initializes a new instance of PrivateEndpointBase. + public PrivateEndpointBase() + { + } + + /// Initializes a new instance of PrivateEndpointBase. + /// The ARM identifier for Private Endpoint. + internal PrivateEndpointBase(ResourceIdentifier id) + { + Id = id; + } + + /// The ARM identifier for Private Endpoint. + public ResourceIdentifier Id { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.Serialization.cs new file mode 100644 index 0000000000000..e4f7788fd90d2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PrivateEndpointDestination : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ServiceResourceId)) + { + writer.WritePropertyName("serviceResourceId"u8); + writer.WriteStringValue(ServiceResourceId); + } + if (Optional.IsDefined(SparkEnabled)) + { + writer.WritePropertyName("sparkEnabled"u8); + writer.WriteBooleanValue(SparkEnabled.Value); + } + if (Optional.IsDefined(SparkStatus)) + { + writer.WritePropertyName("sparkStatus"u8); + writer.WriteStringValue(SparkStatus.Value.ToString()); + } + if (Optional.IsDefined(SubresourceTarget)) + { + writer.WritePropertyName("subresourceTarget"u8); + writer.WriteStringValue(SubresourceTarget); + } + writer.WriteEndObject(); + } + + internal static PrivateEndpointDestination DeserializePrivateEndpointDestination(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional serviceResourceId = default; + Optional sparkEnabled = default; + Optional sparkStatus = default; + Optional subresourceTarget = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceResourceId"u8)) + { + serviceResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sparkEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("sparkStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkStatus = new OutboundRuleStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("subresourceTarget"u8)) + { + subresourceTarget = property.Value.GetString(); + continue; + } + } + return new PrivateEndpointDestination(serviceResourceId.Value, Optional.ToNullable(sparkEnabled), Optional.ToNullable(sparkStatus), subresourceTarget.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.cs new file mode 100644 index 0000000000000..8d9eadfc609fc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointDestination.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + public partial class PrivateEndpointDestination + { + /// Initializes a new instance of PrivateEndpointDestination. + public PrivateEndpointDestination() + { + } + + /// Initializes a new instance of PrivateEndpointDestination. + /// + /// + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// + internal PrivateEndpointDestination(string serviceResourceId, bool? sparkEnabled, OutboundRuleStatus? sparkStatus, string subresourceTarget) + { + ServiceResourceId = serviceResourceId; + SparkEnabled = sparkEnabled; + SparkStatus = sparkStatus; + SubresourceTarget = subresourceTarget; + } + + /// Gets or sets the service resource id. + public string ServiceResourceId { get; set; } + /// Gets or sets the spark enabled. + public bool? SparkEnabled { get; set; } + /// Type of a managed network Outbound Rule of a machine learning workspace. + public OutboundRuleStatus? SparkStatus { get; set; } + /// Gets or sets the subresource target. + public string SubresourceTarget { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs new file mode 100644 index 0000000000000..09b54ab03cead --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PrivateEndpointOutboundRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Destination)) + { + writer.WritePropertyName("destination"u8); + writer.WriteObjectValue(Destination); + } + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(OutboundRuleType.ToString()); + writer.WriteEndObject(); + } + + internal static PrivateEndpointOutboundRule DeserializePrivateEndpointOutboundRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional destination = default; + Optional category = default; + Optional status = default; + OutboundRuleType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destination"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destination = PrivateEndpointDestination.DeserializePrivateEndpointDestination(property.Value); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new OutboundRuleCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new OutboundRuleStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new OutboundRuleType(property.Value.GetString()); + continue; + } + } + return new PrivateEndpointOutboundRule(Optional.ToNullable(category), Optional.ToNullable(status), type, destination.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs new file mode 100644 index 0000000000000..e8b49c7b53031 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + public partial class PrivateEndpointOutboundRule : MachineLearningOutboundRule + { + /// Initializes a new instance of PrivateEndpointOutboundRule. + public PrivateEndpointOutboundRule() + { + OutboundRuleType = OutboundRuleType.PrivateEndpoint; + } + + /// Initializes a new instance of PrivateEndpointOutboundRule. + /// Category of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + internal PrivateEndpointOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, PrivateEndpointDestination destination) : base(category, status, outboundRuleType) + { + Destination = destination; + OutboundRuleType = outboundRuleType; + } + + /// Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + public PrivateEndpointDestination Destination { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.Serialization.cs new file mode 100644 index 0000000000000..b4356e1b7411c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ProgressMetrics + { + internal static ProgressMetrics DeserializeProgressMetrics(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional completedDatapointCount = default; + Optional incrementalDataLastRefreshDateTime = default; + Optional skippedDatapointCount = default; + Optional totalDatapointCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("completedDatapointCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + completedDatapointCount = null; + continue; + } + completedDatapointCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("incrementalDataLastRefreshDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + incrementalDataLastRefreshDateTime = null; + continue; + } + incrementalDataLastRefreshDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("skippedDatapointCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + skippedDatapointCount = null; + continue; + } + skippedDatapointCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("totalDatapointCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + totalDatapointCount = null; + continue; + } + totalDatapointCount = property.Value.GetInt64(); + continue; + } + } + return new ProgressMetrics(Optional.ToNullable(completedDatapointCount), Optional.ToNullable(incrementalDataLastRefreshDateTime), Optional.ToNullable(skippedDatapointCount), Optional.ToNullable(totalDatapointCount)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.cs new file mode 100644 index 0000000000000..0b5ff7be1138b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProgressMetrics.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Progress metrics definition. + public partial class ProgressMetrics + { + /// Initializes a new instance of ProgressMetrics. + internal ProgressMetrics() + { + } + + /// Initializes a new instance of ProgressMetrics. + /// The completed datapoint count. + /// The time of last successful incremental data refresh in UTC. + /// The skipped datapoint count. + /// The total datapoint count. + internal ProgressMetrics(long? completedDatapointCount, DateTimeOffset? incrementalDataLastRefreshOn, long? skippedDatapointCount, long? totalDatapointCount) + { + CompletedDatapointCount = completedDatapointCount; + IncrementalDataLastRefreshOn = incrementalDataLastRefreshOn; + SkippedDatapointCount = skippedDatapointCount; + TotalDatapointCount = totalDatapointCount; + } + + /// The completed datapoint count. + public long? CompletedDatapointCount { get; } + /// The time of last successful incremental data refresh in UTC. + public DateTimeOffset? IncrementalDataLastRefreshOn { get; } + /// The skipped datapoint count. + public long? SkippedDatapointCount { get; } + /// The total datapoint count. + public long? TotalDatapointCount { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs index f7dc3543d1bc0..449039a380b07 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs @@ -15,6 +15,18 @@ public partial class RandomSamplingAlgorithm : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Logbase)) + { + if (Logbase != null) + { + writer.WritePropertyName("logbase"u8); + writer.WriteStringValue(Logbase); + } + else + { + writer.WriteNull("logbase"); + } + } if (Optional.IsDefined(Rule)) { writer.WritePropertyName("rule"u8); @@ -43,11 +55,22 @@ internal static RandomSamplingAlgorithm DeserializeRandomSamplingAlgorithm(JsonE { return null; } + Optional logbase = default; Optional rule = default; Optional seed = default; SamplingAlgorithmType samplingAlgorithmType = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("logbase"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + logbase = null; + continue; + } + logbase = property.Value.GetString(); + continue; + } if (property.NameEquals("rule"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -73,7 +96,7 @@ internal static RandomSamplingAlgorithm DeserializeRandomSamplingAlgorithm(JsonE continue; } } - return new RandomSamplingAlgorithm(samplingAlgorithmType, Optional.ToNullable(rule), Optional.ToNullable(seed)); + return new RandomSamplingAlgorithm(samplingAlgorithmType, logbase.Value, Optional.ToNullable(rule), Optional.ToNullable(seed)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs index d82bf35528f33..e965feca1ad16 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs @@ -18,15 +18,19 @@ public RandomSamplingAlgorithm() /// Initializes a new instance of RandomSamplingAlgorithm. /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. + /// An optional positive number or e in string format to be used as base for log based random sampling. /// The specific type of random algorithm. /// An optional integer to use as the seed for random number generation. - internal RandomSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType, RandomSamplingAlgorithmRule? rule, int? seed) : base(samplingAlgorithmType) + internal RandomSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType, string logbase, RandomSamplingAlgorithmRule? rule, int? seed) : base(samplingAlgorithmType) { + Logbase = logbase; Rule = rule; Seed = seed; SamplingAlgorithmType = samplingAlgorithmType; } + /// An optional positive number or e in string format to be used as base for log based random sampling. + public string Logbase { get; set; } /// The specific type of random algorithm. public RandomSamplingAlgorithmRule? Rule { get; set; } /// An optional integer to use as the seed for random number generation. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.Serialization.cs new file mode 100644 index 0000000000000..6e23095dc1602 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class RayDistributionConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Address)) + { + if (Address != null) + { + writer.WritePropertyName("address"u8); + writer.WriteStringValue(Address); + } + else + { + writer.WriteNull("address"); + } + } + if (Optional.IsDefined(DashboardPort)) + { + if (DashboardPort != null) + { + writer.WritePropertyName("dashboardPort"u8); + writer.WriteNumberValue(DashboardPort.Value); + } + else + { + writer.WriteNull("dashboardPort"); + } + } + if (Optional.IsDefined(HeadNodeAdditionalArgs)) + { + if (HeadNodeAdditionalArgs != null) + { + writer.WritePropertyName("headNodeAdditionalArgs"u8); + writer.WriteStringValue(HeadNodeAdditionalArgs); + } + else + { + writer.WriteNull("headNodeAdditionalArgs"); + } + } + if (Optional.IsDefined(IncludeDashboard)) + { + if (IncludeDashboard != null) + { + writer.WritePropertyName("includeDashboard"u8); + writer.WriteBooleanValue(IncludeDashboard.Value); + } + else + { + writer.WriteNull("includeDashboard"); + } + } + if (Optional.IsDefined(Port)) + { + if (Port != null) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + else + { + writer.WriteNull("port"); + } + } + if (Optional.IsDefined(WorkerNodeAdditionalArgs)) + { + if (WorkerNodeAdditionalArgs != null) + { + writer.WritePropertyName("workerNodeAdditionalArgs"u8); + writer.WriteStringValue(WorkerNodeAdditionalArgs); + } + else + { + writer.WriteNull("workerNodeAdditionalArgs"); + } + } + writer.WritePropertyName("distributionType"u8); + writer.WriteStringValue(DistributionType.ToString()); + writer.WriteEndObject(); + } + + internal static RayDistributionConfiguration DeserializeRayDistributionConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional address = default; + Optional dashboardPort = default; + Optional headNodeAdditionalArgs = default; + Optional includeDashboard = default; + Optional port = default; + Optional workerNodeAdditionalArgs = default; + DistributionType distributionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("address"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + address = null; + continue; + } + address = property.Value.GetString(); + continue; + } + if (property.NameEquals("dashboardPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dashboardPort = null; + continue; + } + dashboardPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("headNodeAdditionalArgs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + headNodeAdditionalArgs = null; + continue; + } + headNodeAdditionalArgs = property.Value.GetString(); + continue; + } + if (property.NameEquals("includeDashboard"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + includeDashboard = null; + continue; + } + includeDashboard = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + port = null; + continue; + } + port = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("workerNodeAdditionalArgs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + workerNodeAdditionalArgs = null; + continue; + } + workerNodeAdditionalArgs = property.Value.GetString(); + continue; + } + if (property.NameEquals("distributionType"u8)) + { + distributionType = new DistributionType(property.Value.GetString()); + continue; + } + } + return new RayDistributionConfiguration(distributionType, address.Value, Optional.ToNullable(dashboardPort), headNodeAdditionalArgs.Value, Optional.ToNullable(includeDashboard), Optional.ToNullable(port), workerNodeAdditionalArgs.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.cs new file mode 100644 index 0000000000000..d398b5daedb1e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RayDistributionConfiguration.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Ray distribution configuration. + public partial class RayDistributionConfiguration : MachineLearningDistributionConfiguration + { + /// Initializes a new instance of RayDistributionConfiguration. + public RayDistributionConfiguration() + { + DistributionType = DistributionType.Ray; + } + + /// Initializes a new instance of RayDistributionConfiguration. + /// [Required] Specifies the type of distribution framework. + /// The address of Ray head node. + /// The port to bind the dashboard server to. + /// Additional arguments passed to ray start in head node. + /// Provide this argument to start the Ray dashboard GUI. + /// The port of the head ray process. + /// Additional arguments passed to ray start in worker node. + internal RayDistributionConfiguration(DistributionType distributionType, string address, int? dashboardPort, string headNodeAdditionalArgs, bool? includeDashboard, int? port, string workerNodeAdditionalArgs) : base(distributionType) + { + Address = address; + DashboardPort = dashboardPort; + HeadNodeAdditionalArgs = headNodeAdditionalArgs; + IncludeDashboard = includeDashboard; + Port = port; + WorkerNodeAdditionalArgs = workerNodeAdditionalArgs; + DistributionType = distributionType; + } + + /// The address of Ray head node. + public string Address { get; set; } + /// The port to bind the dashboard server to. + public int? DashboardPort { get; set; } + /// Additional arguments passed to ray start in head node. + public string HeadNodeAdditionalArgs { get; set; } + /// Provide this argument to start the Ray dashboard GUI. + public bool? IncludeDashboard { get; set; } + /// The port of the head ray process. + public int? Port { get; set; } + /// Additional arguments passed to ray start in worker node. + public string WorkerNodeAdditionalArgs { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.Serialization.cs new file mode 100644 index 0000000000000..a6dc589ecb4ab --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class RegistryAcrDetails : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SystemCreatedAcrAccount)) + { + if (SystemCreatedAcrAccount != null) + { + writer.WritePropertyName("systemCreatedAcrAccount"u8); + writer.WriteObjectValue(SystemCreatedAcrAccount); + } + else + { + writer.WriteNull("systemCreatedAcrAccount"); + } + } + if (Optional.IsDefined(UserCreatedAcrAccount)) + { + if (UserCreatedAcrAccount != null) + { + writer.WritePropertyName("userCreatedAcrAccount"u8); + writer.WriteObjectValue(UserCreatedAcrAccount); + } + else + { + writer.WriteNull("userCreatedAcrAccount"); + } + } + writer.WriteEndObject(); + } + + internal static RegistryAcrDetails DeserializeRegistryAcrDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional systemCreatedAcrAccount = default; + Optional userCreatedAcrAccount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("systemCreatedAcrAccount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + systemCreatedAcrAccount = null; + continue; + } + systemCreatedAcrAccount = SystemCreatedAcrAccount.DeserializeSystemCreatedAcrAccount(property.Value); + continue; + } + if (property.NameEquals("userCreatedAcrAccount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + userCreatedAcrAccount = null; + continue; + } + userCreatedAcrAccount = UserCreatedAcrAccount.DeserializeUserCreatedAcrAccount(property.Value); + continue; + } + } + return new RegistryAcrDetails(systemCreatedAcrAccount.Value, userCreatedAcrAccount.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.cs new file mode 100644 index 0000000000000..5aa2eca5a995f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAcrDetails.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Details of ACR account to be used for the Registry. + public partial class RegistryAcrDetails + { + /// Initializes a new instance of RegistryAcrDetails. + public RegistryAcrDetails() + { + } + + /// Initializes a new instance of RegistryAcrDetails. + /// Details of system created ACR account to be used for the Registry. + /// Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided. + internal RegistryAcrDetails(SystemCreatedAcrAccount systemCreatedAcrAccount, UserCreatedAcrAccount userCreatedAcrAccount) + { + SystemCreatedAcrAccount = systemCreatedAcrAccount; + UserCreatedAcrAccount = userCreatedAcrAccount; + } + + /// Details of system created ACR account to be used for the Registry. + public SystemCreatedAcrAccount SystemCreatedAcrAccount { get; set; } + /// Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided. + internal UserCreatedAcrAccount UserCreatedAcrAccount { get; set; } + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ArmResourceId + { + get => UserCreatedAcrAccount is null ? default : UserCreatedAcrAccount.ArmResourceId; + set + { + if (UserCreatedAcrAccount is null) + UserCreatedAcrAccount = new UserCreatedAcrAccount(); + UserCreatedAcrAccount.ArmResourceId = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAssetProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAssetProvisioningState.cs new file mode 100644 index 0000000000000..a24593c3ebd95 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryAssetProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Provisioning state of registry asset. + public readonly partial struct RegistryAssetProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RegistryAssetProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + + /// Succeeded. + public static RegistryAssetProvisioningState Succeeded { get; } = new RegistryAssetProvisioningState(SucceededValue); + /// Failed. + public static RegistryAssetProvisioningState Failed { get; } = new RegistryAssetProvisioningState(FailedValue); + /// Canceled. + public static RegistryAssetProvisioningState Canceled { get; } = new RegistryAssetProvisioningState(CanceledValue); + /// Creating. + public static RegistryAssetProvisioningState Creating { get; } = new RegistryAssetProvisioningState(CreatingValue); + /// Updating. + public static RegistryAssetProvisioningState Updating { get; } = new RegistryAssetProvisioningState(UpdatingValue); + /// Deleting. + public static RegistryAssetProvisioningState Deleting { get; } = new RegistryAssetProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(RegistryAssetProvisioningState left, RegistryAssetProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RegistryAssetProvisioningState left, RegistryAssetProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RegistryAssetProvisioningState(string value) => new RegistryAssetProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RegistryAssetProvisioningState other && Equals(other); + /// + public bool Equals(RegistryAssetProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.Serialization.cs new file mode 100644 index 0000000000000..6da0bbbe9a9a2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class RegistryPrivateEndpoint : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SubnetArmId)) + { + if (SubnetArmId != null) + { + writer.WritePropertyName("subnetArmId"u8); + writer.WriteStringValue(SubnetArmId); + } + else + { + writer.WriteNull("subnetArmId"); + } + } + writer.WriteEndObject(); + } + + internal static RegistryPrivateEndpoint DeserializeRegistryPrivateEndpoint(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional subnetArmId = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetArmId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subnetArmId = null; + continue; + } + subnetArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new RegistryPrivateEndpoint(id.Value, subnetArmId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.cs new file mode 100644 index 0000000000000..a53d2a95286a0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpoint.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The PE network resource that is linked to this PE connection. + public partial class RegistryPrivateEndpoint : PrivateEndpointBase + { + /// Initializes a new instance of RegistryPrivateEndpoint. + public RegistryPrivateEndpoint() + { + } + + /// Initializes a new instance of RegistryPrivateEndpoint. + /// The ARM identifier for Private Endpoint. + /// The subnetId that the private endpoint is connected to. + internal RegistryPrivateEndpoint(ResourceIdentifier id, ResourceIdentifier subnetArmId) : base(id) + { + SubnetArmId = subnetArmId; + } + + /// The subnetId that the private endpoint is connected to. + public ResourceIdentifier SubnetArmId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.Serialization.cs new file mode 100644 index 0000000000000..5b02757054561 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class RegistryPrivateEndpointConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + if (Id != null) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + else + { + writer.WriteNull("id"); + } + } + if (Optional.IsDefined(Location)) + { + if (Location != null) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + else + { + writer.WriteNull("location"); + } + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(GroupIds)) + { + if (GroupIds != null) + { + writer.WritePropertyName("groupIds"u8); + writer.WriteStartArray(); + foreach (var item in GroupIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("groupIds"); + } + } + if (Optional.IsDefined(PrivateEndpoint)) + { + if (PrivateEndpoint != null) + { + writer.WritePropertyName("privateEndpoint"u8); + writer.WriteObjectValue(PrivateEndpoint); + } + else + { + writer.WriteNull("privateEndpoint"); + } + } + if (Optional.IsDefined(PrivateLinkServiceConnectionState)) + { + if (PrivateLinkServiceConnectionState != null) + { + writer.WritePropertyName("privateLinkServiceConnectionState"u8); + writer.WriteObjectValue(PrivateLinkServiceConnectionState); + } + else + { + writer.WriteNull("privateLinkServiceConnectionState"); + } + } + if (Optional.IsDefined(ProvisioningState)) + { + if (ProvisioningState != null) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + else + { + writer.WriteNull("provisioningState"); + } + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static RegistryPrivateEndpointConnection DeserializeRegistryPrivateEndpointConnection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional location = default; + Optional> groupIds = default; + Optional privateEndpoint = default; + Optional privateLinkServiceConnectionState = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + location = null; + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("groupIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + groupIds = null; + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + groupIds = array; + continue; + } + if (property0.NameEquals("privateEndpoint"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + privateEndpoint = null; + continue; + } + privateEndpoint = RegistryPrivateEndpoint.DeserializeRegistryPrivateEndpoint(property0.Value); + continue; + } + if (property0.NameEquals("privateLinkServiceConnectionState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + privateLinkServiceConnectionState = null; + continue; + } + privateLinkServiceConnectionState = RegistryPrivateLinkServiceConnectionState.DeserializeRegistryPrivateLinkServiceConnectionState(property0.Value); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + provisioningState = null; + continue; + } + provisioningState = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new RegistryPrivateEndpointConnection(id.Value, Optional.ToNullable(location), Optional.ToList(groupIds), privateEndpoint.Value, privateLinkServiceConnectionState.Value, provisioningState.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.cs new file mode 100644 index 0000000000000..d943869aa73d8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateEndpointConnection.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Private endpoint connection definition. + public partial class RegistryPrivateEndpointConnection + { + /// Initializes a new instance of RegistryPrivateEndpointConnection. + public RegistryPrivateEndpointConnection() + { + GroupIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of RegistryPrivateEndpointConnection. + /// + /// This is the private endpoint connection name created on SRP + /// Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} + /// + /// Same as workspace location. + /// The group ids. + /// The PE network resource that is linked to this PE connection. + /// The connection state. + /// One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. + internal RegistryPrivateEndpointConnection(ResourceIdentifier id, AzureLocation? location, IList groupIds, RegistryPrivateEndpoint privateEndpoint, RegistryPrivateLinkServiceConnectionState privateLinkServiceConnectionState, string provisioningState) + { + Id = id; + Location = location; + GroupIds = groupIds; + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + ProvisioningState = provisioningState; + } + + /// + /// This is the private endpoint connection name created on SRP + /// Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} + /// + public ResourceIdentifier Id { get; set; } + /// Same as workspace location. + public AzureLocation? Location { get; set; } + /// The group ids. + public IList GroupIds { get; set; } + /// The PE network resource that is linked to this PE connection. + public RegistryPrivateEndpoint PrivateEndpoint { get; set; } + /// The connection state. + public RegistryPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + /// One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. + public string ProvisioningState { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs new file mode 100644 index 0000000000000..0369d001f3191 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class RegistryPrivateLinkServiceConnectionState : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ActionsRequired)) + { + if (ActionsRequired != null) + { + writer.WritePropertyName("actionsRequired"u8); + writer.WriteStringValue(ActionsRequired); + } + else + { + writer.WriteNull("actionsRequired"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static RegistryPrivateLinkServiceConnectionState DeserializeRegistryPrivateLinkServiceConnectionState(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional actionsRequired = default; + Optional description = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionsRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + actionsRequired = null; + continue; + } + actionsRequired = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new MachineLearningPrivateEndpointServiceConnectionStatus(property.Value.GetString()); + continue; + } + } + return new RegistryPrivateLinkServiceConnectionState(actionsRequired.Value, description.Value, Optional.ToNullable(status)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs new file mode 100644 index 0000000000000..38fe66af716f9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The connection state. + public partial class RegistryPrivateLinkServiceConnectionState + { + /// Initializes a new instance of RegistryPrivateLinkServiceConnectionState. + public RegistryPrivateLinkServiceConnectionState() + { + } + + /// Initializes a new instance of RegistryPrivateLinkServiceConnectionState. + /// Some RP chose "None". Other RPs use this for region expansion. + /// User-defined message that, per NRP doc, may be used for approval-related message. + /// Connection status of the service consumer with the service provider. + internal RegistryPrivateLinkServiceConnectionState(string actionsRequired, string description, MachineLearningPrivateEndpointServiceConnectionStatus? status) + { + ActionsRequired = actionsRequired; + Description = description; + Status = status; + } + + /// Some RP chose "None". Other RPs use this for region expansion. + public string ActionsRequired { get; set; } + /// User-defined message that, per NRP doc, may be used for approval-related message. + public string Description { get; set; } + /// Connection status of the service consumer with the service provider. + public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.Serialization.cs new file mode 100644 index 0000000000000..03a6fef22c809 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.Serialization.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class RegistryRegionArmDetails : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AcrDetails)) + { + if (AcrDetails != null) + { + writer.WritePropertyName("acrDetails"u8); + writer.WriteStartArray(); + foreach (var item in AcrDetails) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("acrDetails"); + } + } + if (Optional.IsDefined(Location)) + { + if (Location != null) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + else + { + writer.WriteNull("location"); + } + } + if (Optional.IsCollectionDefined(StorageAccountDetails)) + { + if (StorageAccountDetails != null) + { + writer.WritePropertyName("storageAccountDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageAccountDetails) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("storageAccountDetails"); + } + } + writer.WriteEndObject(); + } + + internal static RegistryRegionArmDetails DeserializeRegistryRegionArmDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> acrDetails = default; + Optional location = default; + Optional> storageAccountDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("acrDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + acrDetails = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RegistryAcrDetails.DeserializeRegistryAcrDetails(item)); + } + acrDetails = array; + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + location = null; + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageAccountDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + storageAccountDetails = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.StorageAccountDetails.DeserializeStorageAccountDetails(item)); + } + storageAccountDetails = array; + continue; + } + } + return new RegistryRegionArmDetails(Optional.ToList(acrDetails), Optional.ToNullable(location), Optional.ToList(storageAccountDetails)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.cs new file mode 100644 index 0000000000000..6c2806add2fc6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryRegionArmDetails.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Details for each region the registry is in. + public partial class RegistryRegionArmDetails + { + /// Initializes a new instance of RegistryRegionArmDetails. + public RegistryRegionArmDetails() + { + AcrDetails = new ChangeTrackingList(); + StorageAccountDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of RegistryRegionArmDetails. + /// List of ACR accounts. + /// The location where the registry exists. + /// List of storage accounts. + internal RegistryRegionArmDetails(IList acrDetails, AzureLocation? location, IList storageAccountDetails) + { + AcrDetails = acrDetails; + Location = location; + StorageAccountDetails = storageAccountDetails; + } + + /// List of ACR accounts. + public IList AcrDetails { get; set; } + /// The location where the registry exists. + public AzureLocation? Location { get; set; } + /// List of storage accounts. + public IList StorageAccountDetails { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 0000000000000..f4f0c9caacbfd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class RegistryTrackedResourceArmPaginatedResult + { + internal static RegistryTrackedResourceArmPaginatedResult DeserializeRegistryTrackedResourceArmPaginatedResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningRegistryData.DeserializeMachineLearningRegistryData(item)); + } + value = array; + continue; + } + } + return new RegistryTrackedResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.cs new file mode 100644 index 0000000000000..1feba685be828 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryTrackedResourceArmPaginatedResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// A paginated list of Registry entities. + internal partial class RegistryTrackedResourceArmPaginatedResult + { + /// Initializes a new instance of RegistryTrackedResourceArmPaginatedResult. + internal RegistryTrackedResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of RegistryTrackedResourceArmPaginatedResult. + /// The link to the next page of Registry objects. If null, there are no additional pages. + /// An array of objects of type Registry. + internal RegistryTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// The link to the next page of Registry objects. If null, there are no additional pages. + public string NextLink { get; } + /// An array of objects of type Registry. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetric.cs new file mode 100644 index 0000000000000..786edd7e57485 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetric.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The RegressionModelPerformanceMetric. + public readonly partial struct RegressionModelPerformanceMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RegressionModelPerformanceMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MeanAbsoluteErrorValue = "MeanAbsoluteError"; + private const string RootMeanSquaredErrorValue = "RootMeanSquaredError"; + private const string MeanSquaredErrorValue = "MeanSquaredError"; + + /// The Mean Absolute Error (MAE) metric. + public static RegressionModelPerformanceMetric MeanAbsoluteError { get; } = new RegressionModelPerformanceMetric(MeanAbsoluteErrorValue); + /// The Root Mean Squared Error (RMSE) metric. + public static RegressionModelPerformanceMetric RootMeanSquaredError { get; } = new RegressionModelPerformanceMetric(RootMeanSquaredErrorValue); + /// The Mean Squared Error (MSE) metric. + public static RegressionModelPerformanceMetric MeanSquaredError { get; } = new RegressionModelPerformanceMetric(MeanSquaredErrorValue); + /// Determines if two values are the same. + public static bool operator ==(RegressionModelPerformanceMetric left, RegressionModelPerformanceMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RegressionModelPerformanceMetric left, RegressionModelPerformanceMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RegressionModelPerformanceMetric(string value) => new RegressionModelPerformanceMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RegressionModelPerformanceMetric other && Equals(other); + /// + public bool Equals(RegressionModelPerformanceMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.Serialization.cs new file mode 100644 index 0000000000000..0895982c46d60 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class RegressionModelPerformanceMetricThreshold : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); + writer.WritePropertyName("modelType"u8); + writer.WriteStringValue(ModelType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static RegressionModelPerformanceMetricThreshold DeserializeRegressionModelPerformanceMetricThreshold(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegressionModelPerformanceMetric metric = default; + MonitoringModelType modelType = default; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metric"u8)) + { + metric = new RegressionModelPerformanceMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("modelType"u8)) + { + modelType = new MonitoringModelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new RegressionModelPerformanceMetricThreshold(modelType, threshold.Value, metric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.cs new file mode 100644 index 0000000000000..422800b0a4186 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModelPerformanceMetricThreshold.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The RegressionModelPerformanceMetricThreshold. + public partial class RegressionModelPerformanceMetricThreshold : ModelPerformanceMetricThresholdBase + { + /// Initializes a new instance of RegressionModelPerformanceMetricThreshold. + /// [Required] The regression model performance metric to calculate. + public RegressionModelPerformanceMetricThreshold(RegressionModelPerformanceMetric metric) + { + Metric = metric; + ModelType = MonitoringModelType.Regression; + } + + /// Initializes a new instance of RegressionModelPerformanceMetricThreshold. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The regression model performance metric to calculate. + internal RegressionModelPerformanceMetricThreshold(MonitoringModelType modelType, MonitoringThreshold threshold, RegressionModelPerformanceMetric metric) : base(modelType, threshold) + { + Metric = metric; + ModelType = modelType; + } + + /// [Required] The regression model performance metric to calculate. + public RegressionModelPerformanceMetric Metric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs index 9c07ede26ba01..8f28a3fccee2f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs @@ -93,6 +93,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("stackEnsembleSettings"); } } + if (Optional.IsDefined(TrainingMode)) + { + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -111,6 +116,7 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings Optional enableVoteEnsemble = default; Optional ensembleModelDownloadTimeout = default; Optional stackEnsembleSettings = default; + Optional trainingMode = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("allowedTrainingAlgorithms"u8)) @@ -207,8 +213,17 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); continue; } + if (property.NameEquals("trainingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } } - return new RegressionTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value, Optional.ToList(allowedTrainingAlgorithms), Optional.ToList(blockedTrainingAlgorithms)); + return new RegressionTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value, Optional.ToNullable(trainingMode), Optional.ToList(allowedTrainingAlgorithms), Optional.ToList(blockedTrainingAlgorithms)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs index dfbd361e3b313..e3caefa360310 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs @@ -32,9 +32,14 @@ public RegressionTrainingSettings() /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// /// Stack ensemble settings for stack ensemble run. + /// + /// TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + /// If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + /// If 'NonDistributed' then only non distributed algorithms are chosen. + /// /// Allowed models for regression task. /// Blocked models for regression task. - internal RegressionTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings) + internal RegressionTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, TrainingMode? trainingMode, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings, trainingMode) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.Serialization.cs new file mode 100644 index 0000000000000..e5ef96e6fdc86 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class RequestLogging : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(CaptureHeaders)) + { + if (CaptureHeaders != null) + { + writer.WritePropertyName("captureHeaders"u8); + writer.WriteStartArray(); + foreach (var item in CaptureHeaders) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("captureHeaders"); + } + } + writer.WriteEndObject(); + } + + internal static RequestLogging DeserializeRequestLogging(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> captureHeaders = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("captureHeaders"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + captureHeaders = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + captureHeaders = array; + continue; + } + } + return new RequestLogging(Optional.ToList(captureHeaders)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.cs new file mode 100644 index 0000000000000..5522a8915e251 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RequestLogging.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The RequestLogging. + internal partial class RequestLogging + { + /// Initializes a new instance of RequestLogging. + public RequestLogging() + { + CaptureHeaders = new ChangeTrackingList(); + } + + /// Initializes a new instance of RequestLogging. + /// For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload. + internal RequestLogging(IList captureHeaders) + { + CaptureHeaders = captureHeaders; + } + + /// For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload. + public IList CaptureHeaders { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingRateType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingRateType.cs new file mode 100644 index 0000000000000..86aee2e44721b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingRateType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The RollingRateType. + public readonly partial struct RollingRateType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RollingRateType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string YearValue = "Year"; + private const string MonthValue = "Month"; + private const string DayValue = "Day"; + private const string HourValue = "Hour"; + private const string MinuteValue = "Minute"; + + /// Year. + public static RollingRateType Year { get; } = new RollingRateType(YearValue); + /// Month. + public static RollingRateType Month { get; } = new RollingRateType(MonthValue); + /// Day. + public static RollingRateType Day { get; } = new RollingRateType(DayValue); + /// Hour. + public static RollingRateType Hour { get; } = new RollingRateType(HourValue); + /// Minute. + public static RollingRateType Minute { get; } = new RollingRateType(MinuteValue); + /// Determines if two values are the same. + public static bool operator ==(RollingRateType left, RollingRateType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RollingRateType left, RollingRateType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RollingRateType(string value) => new RollingRateType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RollingRateType other && Equals(other); + /// + public bool Equals(RollingRateType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.Serialization.cs new file mode 100644 index 0000000000000..72e3b25091c0a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SasCredentialDto + { + internal static SasCredentialDto DeserializeSasCredentialDto(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional sasUri = default; + PendingUploadCredentialType credentialType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sasUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sasUri = null; + continue; + } + sasUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("credentialType"u8)) + { + credentialType = new PendingUploadCredentialType(property.Value.GetString()); + continue; + } + } + return new SasCredentialDto(credentialType, sasUri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.cs new file mode 100644 index 0000000000000..e2ff2c64e844f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasCredentialDto.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The SasCredentialDto. + public partial class SasCredentialDto : PendingUploadCredentialDto + { + /// Initializes a new instance of SasCredentialDto. + internal SasCredentialDto() + { + CredentialType = PendingUploadCredentialType.Sas; + } + + /// Initializes a new instance of SasCredentialDto. + /// [Required] Credential type used to authentication with storage. + /// Full SAS Uri, including the storage, container/blob path and SAS token. + internal SasCredentialDto(PendingUploadCredentialType credentialType, Uri sasUri) : base(credentialType) + { + SasUri = sasUri; + CredentialType = credentialType; + } + + /// Full SAS Uri, including the storage, container/blob path and SAS token. + public Uri SasUri { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs index 0b2403a6e1951..d7bd0301cff1c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs @@ -24,11 +24,17 @@ public ScheduleActionType(string value) private const string CreateJobValue = "CreateJob"; private const string InvokeBatchEndpointValue = "InvokeBatchEndpoint"; + private const string ImportDataValue = "ImportData"; + private const string CreateMonitorValue = "CreateMonitor"; /// CreateJob. public static ScheduleActionType CreateJob { get; } = new ScheduleActionType(CreateJobValue); /// InvokeBatchEndpoint. public static ScheduleActionType InvokeBatchEndpoint { get; } = new ScheduleActionType(InvokeBatchEndpointValue); + /// ImportData. + public static ScheduleActionType ImportData { get; } = new ScheduleActionType(ImportDataValue); + /// CreateMonitor. + public static ScheduleActionType CreateMonitor { get; } = new ScheduleActionType(CreateMonitorValue); /// Determines if two values are the same. public static bool operator ==(ScheduleActionType left, ScheduleActionType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.Serialization.cs new file mode 100644 index 0000000000000..747058cfaa706 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SecretConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + if (Optional.IsDefined(WorkspaceSecretName)) + { + if (WorkspaceSecretName != null) + { + writer.WritePropertyName("workspaceSecretName"u8); + writer.WriteStringValue(WorkspaceSecretName); + } + else + { + writer.WriteNull("workspaceSecretName"); + } + } + writer.WriteEndObject(); + } + + internal static SecretConfiguration DeserializeSecretConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional uri = default; + Optional workspaceSecretName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("workspaceSecretName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + workspaceSecretName = null; + continue; + } + workspaceSecretName = property.Value.GetString(); + continue; + } + } + return new SecretConfiguration(uri.Value, workspaceSecretName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.cs new file mode 100644 index 0000000000000..87553f52573d5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretConfiguration.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Secret Configuration definition. + public partial class SecretConfiguration + { + /// Initializes a new instance of SecretConfiguration. + public SecretConfiguration() + { + } + + /// Initializes a new instance of SecretConfiguration. + /// + /// Secret Uri. + /// Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion + /// + /// Name of secret in workspace key vault. + internal SecretConfiguration(Uri uri, string workspaceSecretName) + { + Uri = uri; + WorkspaceSecretName = workspaceSecretName; + } + + /// + /// Secret Uri. + /// Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion + /// + public Uri Uri { get; set; } + /// Name of secret in workspace key vault. + public string WorkspaceSecretName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs index 091196b5382ab..8b548663e774d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs @@ -26,6 +26,8 @@ public SecretsType(string value) private const string CertificateValue = "Certificate"; private const string SasValue = "Sas"; private const string ServicePrincipalValue = "ServicePrincipal"; + private const string KerberosPasswordValue = "KerberosPassword"; + private const string KerberosKeytabValue = "KerberosKeytab"; /// AccountKey. public static SecretsType AccountKey { get; } = new SecretsType(AccountKeyValue); @@ -35,6 +37,10 @@ public SecretsType(string value) public static SecretsType Sas { get; } = new SecretsType(SasValue); /// ServicePrincipal. public static SecretsType ServicePrincipal { get; } = new SecretsType(ServicePrincipalValue); + /// KerberosPassword. + public static SecretsType KerberosPassword { get; } = new SecretsType(KerberosPasswordValue); + /// KerberosKeytab. + public static SecretsType KerberosKeytab { get; } = new SecretsType(KerberosKeytabValue); /// Determines if two values are the same. public static bool operator ==(SecretsType left, SecretsType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs index bf4439457c5ba..74dd8f1f4205d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs @@ -16,15 +16,15 @@ public ServiceManagedResourcesSettings() } /// Initializes a new instance of ServiceManagedResourcesSettings. - /// The settings for the service managed cosmosdb account. + /// internal ServiceManagedResourcesSettings(CosmosDbSettings cosmosDb) { CosmosDb = cosmosDb; } - /// The settings for the service managed cosmosdb account. + /// Gets or sets the cosmos db. internal CosmosDbSettings CosmosDb { get; set; } - /// The throughput of the collections in cosmosdb database. + /// Gets or sets the cosmos db collections throughput. public int? CosmosDbCollectionsThroughput { get => CosmosDb is null ? default : CosmosDb.CollectionsThroughput; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs new file mode 100644 index 0000000000000..2d9d953e4f3e5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ServicePrincipalAuthTypeWorkspaceConnectionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(ExpiryOn)) + { + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + writer.WriteEndObject(); + } + + internal static ServicePrincipalAuthTypeWorkspaceConnectionProperties DeserializeServicePrincipalAuthTypeWorkspaceConnectionProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional expiryTime = default; + Optional metadata = default; + Optional target = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + credentials = WorkspaceConnectionServicePrincipal.DeserializeWorkspaceConnectionServicePrincipal(property.Value); + continue; + } + if (property.NameEquals("authType"u8)) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("expiryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + } + return new ServicePrincipalAuthTypeWorkspaceConnectionProperties(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value, credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs new file mode 100644 index 0000000000000..0e079ea92ba2d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The ServicePrincipalAuthTypeWorkspaceConnectionProperties. + public partial class ServicePrincipalAuthTypeWorkspaceConnectionProperties : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties. + public ServicePrincipalAuthTypeWorkspaceConnectionProperties() + { + AuthType = MachineLearningConnectionAuthType.ServicePrincipal; + } + + /// Initializes a new instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties. + /// Authentication type of the connection target. + /// Category of the connection. + /// + /// Any object. + /// + /// + internal ServicePrincipalAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target, WorkspaceConnectionServicePrincipal credentials) : base(authType, category, expiryOn, metadata, target) + { + Credentials = credentials; + AuthType = authType; + } + + /// Gets or sets the credentials. + public WorkspaceConnectionServicePrincipal Credentials { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.Serialization.cs new file mode 100644 index 0000000000000..884efb2b41884 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ServiceTagDestination : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.Value.ToString()); + } + if (Optional.IsDefined(PortRanges)) + { + writer.WritePropertyName("portRanges"u8); + writer.WriteStringValue(PortRanges); + } + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol); + } + if (Optional.IsDefined(ServiceTag)) + { + writer.WritePropertyName("serviceTag"u8); + writer.WriteStringValue(ServiceTag); + } + writer.WriteEndObject(); + } + + internal static ServiceTagDestination DeserializeServiceTagDestination(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional action = default; + Optional> addressPrefixes = default; + Optional portRanges = default; + Optional protocol = default; + Optional serviceTag = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + action = new NetworkingRuleAction(property.Value.GetString()); + continue; + } + if (property.NameEquals("addressPrefixes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addressPrefixes = array; + continue; + } + if (property.NameEquals("portRanges"u8)) + { + portRanges = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol"u8)) + { + protocol = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceTag"u8)) + { + serviceTag = property.Value.GetString(); + continue; + } + } + return new ServiceTagDestination(Optional.ToNullable(action), Optional.ToList(addressPrefixes), portRanges.Value, protocol.Value, serviceTag.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.cs new file mode 100644 index 0000000000000..906ea63d899bb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagDestination.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + public partial class ServiceTagDestination + { + /// Initializes a new instance of ServiceTagDestination. + public ServiceTagDestination() + { + AddressPrefixes = new ChangeTrackingList(); + } + + /// Initializes a new instance of ServiceTagDestination. + /// The action enum for networking rule. + /// Optional, if provided, the ServiceTag property will be ignored. + /// + /// + /// + internal ServiceTagDestination(NetworkingRuleAction? action, IReadOnlyList addressPrefixes, string portRanges, string protocol, string serviceTag) + { + Action = action; + AddressPrefixes = addressPrefixes; + PortRanges = portRanges; + Protocol = protocol; + ServiceTag = serviceTag; + } + + /// The action enum for networking rule. + public NetworkingRuleAction? Action { get; set; } + /// Optional, if provided, the ServiceTag property will be ignored. + public IReadOnlyList AddressPrefixes { get; } + /// Gets or sets the port ranges. + public string PortRanges { get; set; } + /// Gets or sets the protocol. + public string Protocol { get; set; } + /// Gets or sets the service tag. + public string ServiceTag { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs new file mode 100644 index 0000000000000..83982032934b9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ServiceTagOutboundRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Destination)) + { + writer.WritePropertyName("destination"u8); + writer.WriteObjectValue(Destination); + } + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(OutboundRuleType.ToString()); + writer.WriteEndObject(); + } + + internal static ServiceTagOutboundRule DeserializeServiceTagOutboundRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional destination = default; + Optional category = default; + Optional status = default; + OutboundRuleType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destination"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destination = ServiceTagDestination.DeserializeServiceTagDestination(property.Value); + continue; + } + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new OutboundRuleCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new OutboundRuleStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new OutboundRuleType(property.Value.GetString()); + continue; + } + } + return new ServiceTagOutboundRule(Optional.ToNullable(category), Optional.ToNullable(status), type, destination.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs new file mode 100644 index 0000000000000..c8e159fa5447e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Service Tag Outbound Rule for the managed network of a machine learning workspace. + public partial class ServiceTagOutboundRule : MachineLearningOutboundRule + { + /// Initializes a new instance of ServiceTagOutboundRule. + public ServiceTagOutboundRule() + { + OutboundRuleType = OutboundRuleType.ServiceTag; + } + + /// Initializes a new instance of ServiceTagOutboundRule. + /// Category of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + internal ServiceTagOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, ServiceTagDestination destination) : base(category, status, outboundRuleType) + { + Destination = destination; + OutboundRuleType = outboundRuleType; + } + + /// Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + public ServiceTagDestination Destination { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs new file mode 100644 index 0000000000000..4dbc063ccf014 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs @@ -0,0 +1,694 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SparkJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Archives)) + { + if (Archives != null) + { + writer.WritePropertyName("archives"u8); + writer.WriteStartArray(); + foreach (var item in Archives) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("archives"); + } + } + if (Optional.IsDefined(Args)) + { + if (Args != null) + { + writer.WritePropertyName("args"u8); + writer.WriteStringValue(Args); + } + else + { + writer.WriteNull("args"); + } + } + writer.WritePropertyName("codeId"u8); + writer.WriteStringValue(CodeId); + if (Optional.IsCollectionDefined(Conf)) + { + if (Conf != null) + { + writer.WritePropertyName("conf"u8); + writer.WriteStartObject(); + foreach (var item in Conf) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("conf"); + } + } + writer.WritePropertyName("entry"u8); + writer.WriteObjectValue(Entry); + if (Optional.IsDefined(EnvironmentId)) + { + if (EnvironmentId != null) + { + writer.WritePropertyName("environmentId"u8); + writer.WriteStringValue(EnvironmentId); + } + else + { + writer.WriteNull("environmentId"); + } + } + if (Optional.IsCollectionDefined(Files)) + { + if (Files != null) + { + writer.WritePropertyName("files"u8); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("files"); + } + } + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs != null) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("inputs"); + } + } + if (Optional.IsCollectionDefined(Jars)) + { + if (Jars != null) + { + writer.WritePropertyName("jars"u8); + writer.WriteStartArray(); + foreach (var item in Jars) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("jars"); + } + } + if (Optional.IsCollectionDefined(Outputs)) + { + if (Outputs != null) + { + writer.WritePropertyName("outputs"u8); + writer.WriteStartObject(); + foreach (var item in Outputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("outputs"); + } + } + if (Optional.IsCollectionDefined(PyFiles)) + { + if (PyFiles != null) + { + writer.WritePropertyName("pyFiles"u8); + writer.WriteStartArray(); + foreach (var item in PyFiles) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("pyFiles"); + } + } + if (Optional.IsDefined(QueueSettings)) + { + if (QueueSettings != null) + { + writer.WritePropertyName("queueSettings"u8); + writer.WriteObjectValue(QueueSettings); + } + else + { + writer.WriteNull("queueSettings"); + } + } + if (Optional.IsDefined(Resources)) + { + if (Resources != null) + { + writer.WritePropertyName("resources"u8); + writer.WriteObjectValue(Resources); + } + else + { + writer.WriteNull("resources"); + } + } + if (Optional.IsDefined(ComponentId)) + { + if (ComponentId != null) + { + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); + } + else + { + writer.WriteNull("componentId"); + } + } + if (Optional.IsDefined(ComputeId)) + { + if (ComputeId != null) + { + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); + } + else + { + writer.WriteNull("computeId"); + } + } + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsDefined(Identity)) + { + if (Identity != null) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity); + } + else + { + writer.WriteNull("identity"); + } + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); + } + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(NotificationSetting)) + { + if (NotificationSetting != null) + { + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting); + } + else + { + writer.WriteNull("notificationSetting"); + } + } + if (Optional.IsCollectionDefined(SecretsConfiguration)) + { + if (SecretsConfiguration != null) + { + writer.WritePropertyName("secretsConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in SecretsConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("secretsConfiguration"); + } + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) + { + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("services"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags != null) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static SparkJob DeserializeSparkJob(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> archives = default; + Optional args = default; + string codeId = default; + Optional> conf = default; + SparkJobEntry entry = default; + Optional environmentId = default; + Optional> files = default; + Optional> inputs = default; + Optional> jars = default; + Optional> outputs = default; + Optional> pyFiles = default; + Optional queueSettings = default; + Optional resources = default; + Optional componentId = default; + Optional computeId = default; + Optional displayName = default; + Optional experimentName = default; + Optional identity = default; + Optional isArchived = default; + JobType jobType = default; + Optional notificationSetting = default; + Optional> secretsConfiguration = default; + Optional> services = default; + Optional status = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("archives"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + archives = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + archives = array; + continue; + } + if (property.NameEquals("args"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + args = null; + continue; + } + args = property.Value.GetString(); + continue; + } + if (property.NameEquals("codeId"u8)) + { + codeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("conf"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + conf = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + conf = dictionary; + continue; + } + if (property.NameEquals("entry"u8)) + { + entry = SparkJobEntry.DeserializeSparkJobEntry(property.Value); + continue; + } + if (property.NameEquals("environmentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentId = null; + continue; + } + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + files = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + files = array; + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inputs = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value)); + } + inputs = dictionary; + continue; + } + if (property.NameEquals("jars"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jars = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + jars = array; + continue; + } + if (property.NameEquals("outputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outputs = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value)); + } + outputs = dictionary; + continue; + } + if (property.NameEquals("pyFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + pyFiles = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + pyFiles = array; + continue; + } + if (property.NameEquals("queueSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + queueSettings = null; + continue; + } + queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value); + continue; + } + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resources = null; + continue; + } + resources = SparkResourceConfiguration.DeserializeSparkResourceConfiguration(property.Value); + continue; + } + if (property.NameEquals("componentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + componentId = null; + continue; + } + componentId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + computeId = null; + continue; + } + computeId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("experimentName"u8)) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + identity = null; + continue; + } + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value); + continue; + } + if (property.NameEquals("isArchived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("jobType"u8)) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("notificationSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notificationSetting = null; + continue; + } + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value); + continue; + } + if (property.NameEquals("secretsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secretsConfiguration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SecretConfiguration.DeserializeSecretConfiguration(property0.Value)); + } + secretsConfiguration = dictionary; + continue; + } + if (property.NameEquals("services"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + services = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value)); + } + services = dictionary; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new MachineLearningJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new SparkJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, notificationSetting.Value, Optional.ToDictionary(secretsConfiguration), Optional.ToDictionary(services), Optional.ToNullable(status), Optional.ToList(archives), args.Value, codeId, Optional.ToDictionary(conf), entry, environmentId.Value, Optional.ToList(files), Optional.ToDictionary(inputs), Optional.ToList(jars), Optional.ToDictionary(outputs), Optional.ToList(pyFiles), queueSettings.Value, resources.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs new file mode 100644 index 0000000000000..0819130f9e02a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Spark job definition. + public partial class SparkJob : MachineLearningJobProperties + { + /// Initializes a new instance of SparkJob. + /// [Required] ARM resource ID of the code asset. + /// + /// [Required] The entry to execute on startup of the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// or is null. + public SparkJob(string codeId, SparkJobEntry entry) + { + Argument.AssertNotNull(codeId, nameof(codeId)); + Argument.AssertNotNull(entry, nameof(entry)); + + Archives = new ChangeTrackingList(); + CodeId = codeId; + Conf = new ChangeTrackingDictionary(); + Entry = entry; + Files = new ChangeTrackingList(); + Inputs = new ChangeTrackingDictionary(); + Jars = new ChangeTrackingList(); + Outputs = new ChangeTrackingDictionary(); + PyFiles = new ChangeTrackingList(); + JobType = JobType.Spark; + } + + /// Initializes a new instance of SparkJob. + /// The asset description text. + /// The asset property dictionary. + /// Tag dictionary. Tags can be added, removed, and updated. + /// ARM resource ID of the component resource. + /// ARM resource ID of the compute resource. + /// Display name of job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Is the asset archived?. + /// [Required] Specifies the type of job. + /// Notification setting for the job. + /// Configuration for secrets to be made available during runtime. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// Status of the job. + /// Archive files used in the job. + /// Arguments for the job. + /// [Required] ARM resource ID of the code asset. + /// Spark configured properties. + /// + /// [Required] The entry to execute on startup of the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// The ARM resource ID of the Environment specification for the job. + /// Files used in the job. + /// + /// Mapping of input data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// Jar files used in the job. + /// + /// Mapping of output data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// Python files used in the job. + /// Queue settings for the job. + /// Compute Resource configuration for the job. + internal SparkJob(string description, IDictionary properties, IDictionary tags, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary secretsConfiguration, IDictionary services, MachineLearningJobStatus? status, IList archives, string args, string codeId, IDictionary conf, SparkJobEntry entry, string environmentId, IList files, IDictionary inputs, IList jars, IDictionary outputs, IList pyFiles, JobQueueSettings queueSettings, SparkResourceConfiguration resources) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, secretsConfiguration, services, status) + { + Archives = archives; + Args = args; + CodeId = codeId; + Conf = conf; + Entry = entry; + EnvironmentId = environmentId; + Files = files; + Inputs = inputs; + Jars = jars; + Outputs = outputs; + PyFiles = pyFiles; + QueueSettings = queueSettings; + Resources = resources; + JobType = jobType; + } + + /// Archive files used in the job. + public IList Archives { get; set; } + /// Arguments for the job. + public string Args { get; set; } + /// [Required] ARM resource ID of the code asset. + public string CodeId { get; set; } + /// Spark configured properties. + public IDictionary Conf { get; set; } + /// + /// [Required] The entry to execute on startup of the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public SparkJobEntry Entry { get; set; } + /// The ARM resource ID of the Environment specification for the job. + public string EnvironmentId { get; set; } + /// Files used in the job. + public IList Files { get; set; } + /// + /// Mapping of input data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + public IDictionary Inputs { get; set; } + /// Jar files used in the job. + public IList Jars { get; set; } + /// + /// Mapping of output data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + public IDictionary Outputs { get; set; } + /// Python files used in the job. + public IList PyFiles { get; set; } + /// Queue settings for the job. + public JobQueueSettings QueueSettings { get; set; } + /// Compute Resource configuration for the job. + public SparkResourceConfiguration Resources { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.Serialization.cs new file mode 100644 index 0000000000000..937d06f59c17e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SparkJobEntry : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("sparkJobEntryType"u8); + writer.WriteStringValue(SparkJobEntryType.ToString()); + writer.WriteEndObject(); + } + + internal static SparkJobEntry DeserializeSparkJobEntry(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("sparkJobEntryType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SparkJobPythonEntry": return SparkJobPythonEntry.DeserializeSparkJobPythonEntry(element); + case "SparkJobScalaEntry": return SparkJobScalaEntry.DeserializeSparkJobScalaEntry(element); + } + } + return UnknownSparkJobEntry.DeserializeUnknownSparkJobEntry(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.cs new file mode 100644 index 0000000000000..796604f1b9759 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntry.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Spark job entry point definition. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class SparkJobEntry + { + /// Initializes a new instance of SparkJobEntry. + protected SparkJobEntry() + { + } + + /// Initializes a new instance of SparkJobEntry. + /// [Required] Type of the job's entry point. + internal SparkJobEntry(SparkJobEntryType sparkJobEntryType) + { + SparkJobEntryType = sparkJobEntryType; + } + + /// [Required] Type of the job's entry point. + internal SparkJobEntryType SparkJobEntryType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntryType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntryType.cs new file mode 100644 index 0000000000000..72ff3ae366e91 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobEntryType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The SparkJobEntryType. + internal readonly partial struct SparkJobEntryType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SparkJobEntryType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SparkJobPythonEntryValue = "SparkJobPythonEntry"; + private const string SparkJobScalaEntryValue = "SparkJobScalaEntry"; + + /// SparkJobPythonEntry. + public static SparkJobEntryType SparkJobPythonEntry { get; } = new SparkJobEntryType(SparkJobPythonEntryValue); + /// SparkJobScalaEntry. + public static SparkJobEntryType SparkJobScalaEntry { get; } = new SparkJobEntryType(SparkJobScalaEntryValue); + /// Determines if two values are the same. + public static bool operator ==(SparkJobEntryType left, SparkJobEntryType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SparkJobEntryType left, SparkJobEntryType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SparkJobEntryType(string value) => new SparkJobEntryType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SparkJobEntryType other && Equals(other); + /// + public bool Equals(SparkJobEntryType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.Serialization.cs new file mode 100644 index 0000000000000..b9db8d46bd9c3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SparkJobPythonEntry : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("file"u8); + writer.WriteStringValue(File); + writer.WritePropertyName("sparkJobEntryType"u8); + writer.WriteStringValue(SparkJobEntryType.ToString()); + writer.WriteEndObject(); + } + + internal static SparkJobPythonEntry DeserializeSparkJobPythonEntry(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string file = default; + SparkJobEntryType sparkJobEntryType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("file"u8)) + { + file = property.Value.GetString(); + continue; + } + if (property.NameEquals("sparkJobEntryType"u8)) + { + sparkJobEntryType = new SparkJobEntryType(property.Value.GetString()); + continue; + } + } + return new SparkJobPythonEntry(sparkJobEntryType, file); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.cs new file mode 100644 index 0000000000000..f4c23f5948a59 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobPythonEntry.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The SparkJobPythonEntry. + public partial class SparkJobPythonEntry : SparkJobEntry + { + /// Initializes a new instance of SparkJobPythonEntry. + /// [Required] Relative python file path for job entry point. + /// is null. + public SparkJobPythonEntry(string file) + { + Argument.AssertNotNull(file, nameof(file)); + + File = file; + SparkJobEntryType = SparkJobEntryType.SparkJobPythonEntry; + } + + /// Initializes a new instance of SparkJobPythonEntry. + /// [Required] Type of the job's entry point. + /// [Required] Relative python file path for job entry point. + internal SparkJobPythonEntry(SparkJobEntryType sparkJobEntryType, string file) : base(sparkJobEntryType) + { + File = file; + SparkJobEntryType = sparkJobEntryType; + } + + /// [Required] Relative python file path for job entry point. + public string File { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.Serialization.cs new file mode 100644 index 0000000000000..d616db258ea23 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SparkJobScalaEntry : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("className"u8); + writer.WriteStringValue(ClassName); + writer.WritePropertyName("sparkJobEntryType"u8); + writer.WriteStringValue(SparkJobEntryType.ToString()); + writer.WriteEndObject(); + } + + internal static SparkJobScalaEntry DeserializeSparkJobScalaEntry(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string className = default; + SparkJobEntryType sparkJobEntryType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("className"u8)) + { + className = property.Value.GetString(); + continue; + } + if (property.NameEquals("sparkJobEntryType"u8)) + { + sparkJobEntryType = new SparkJobEntryType(property.Value.GetString()); + continue; + } + } + return new SparkJobScalaEntry(sparkJobEntryType, className); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.cs new file mode 100644 index 0000000000000..e769b63064665 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJobScalaEntry.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The SparkJobScalaEntry. + public partial class SparkJobScalaEntry : SparkJobEntry + { + /// Initializes a new instance of SparkJobScalaEntry. + /// [Required] Scala class name used as entry point. + /// is null. + public SparkJobScalaEntry(string className) + { + Argument.AssertNotNull(className, nameof(className)); + + ClassName = className; + SparkJobEntryType = SparkJobEntryType.SparkJobScalaEntry; + } + + /// Initializes a new instance of SparkJobScalaEntry. + /// [Required] Type of the job's entry point. + /// [Required] Scala class name used as entry point. + internal SparkJobScalaEntry(SparkJobEntryType sparkJobEntryType, string className) : base(sparkJobEntryType) + { + ClassName = className; + SparkJobEntryType = sparkJobEntryType; + } + + /// [Required] Scala class name used as entry point. + public string ClassName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.Serialization.cs new file mode 100644 index 0000000000000..b9c33b6fe8274 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SparkResourceConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + if (Optional.IsDefined(RuntimeVersion)) + { + writer.WritePropertyName("runtimeVersion"u8); + writer.WriteStringValue(RuntimeVersion); + } + writer.WriteEndObject(); + } + + internal static SparkResourceConfiguration DeserializeSparkResourceConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional instanceType = default; + Optional runtimeVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("runtimeVersion"u8)) + { + runtimeVersion = property.Value.GetString(); + continue; + } + } + return new SparkResourceConfiguration(instanceType.Value, runtimeVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.cs new file mode 100644 index 0000000000000..bd5511ae11a34 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkResourceConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The SparkResourceConfiguration. + public partial class SparkResourceConfiguration + { + /// Initializes a new instance of SparkResourceConfiguration. + public SparkResourceConfiguration() + { + } + + /// Initializes a new instance of SparkResourceConfiguration. + /// Optional type of VM used as supported by the compute target. + /// Version of spark runtime used for the job. + internal SparkResourceConfiguration(string instanceType, string runtimeVersion) + { + InstanceType = instanceType; + RuntimeVersion = runtimeVersion; + } + + /// Optional type of VM used as supported by the compute target. + public string InstanceType { get; set; } + /// Version of spark runtime used for the job. + public string RuntimeVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs new file mode 100644 index 0000000000000..c5bfb8f37b235 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class StaticInputData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PreprocessingComponentId)) + { + if (PreprocessingComponentId != null) + { + writer.WritePropertyName("preprocessingComponentId"u8); + writer.WriteStringValue(PreprocessingComponentId); + } + else + { + writer.WriteNull("preprocessingComponentId"); + } + } + writer.WritePropertyName("windowEnd"u8); + writer.WriteStringValue(WindowEnd, "O"); + writer.WritePropertyName("windowStart"u8); + writer.WriteStringValue(WindowStart, "O"); + if (Optional.IsCollectionDefined(Columns)) + { + if (Columns != null) + { + writer.WritePropertyName("columns"u8); + writer.WriteStartObject(); + foreach (var item in Columns) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("columns"); + } + } + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + writer.WriteEndObject(); + } + + internal static StaticInputData DeserializeStaticInputData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional preprocessingComponentId = default; + DateTimeOffset windowEnd = default; + DateTimeOffset windowStart = default; + Optional> columns = default; + Optional dataContext = default; + MonitoringInputDataType inputDataType = default; + JobInputType jobInputType = default; + Uri uri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("preprocessingComponentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + preprocessingComponentId = null; + continue; + } + preprocessingComponentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("windowEnd"u8)) + { + windowEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("windowStart"u8)) + { + windowStart = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } + if (property.NameEquals("dataContext"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataContext = null; + continue; + } + dataContext = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputDataType"u8)) + { + inputDataType = new MonitoringInputDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobInputType"u8)) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } + } + return new StaticInputData(Optional.ToDictionary(columns), dataContext.Value, inputDataType, jobInputType, uri, preprocessingComponentId.Value, windowEnd, windowStart); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs new file mode 100644 index 0000000000000..642070e3638b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Static input data definition. + public partial class StaticInputData : MonitoringInputDataBase + { + /// Initializes a new instance of StaticInputData. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + /// [Required] The end date of the data window. + /// [Required] The start date of the data window. + /// is null. + public StaticInputData(JobInputType jobInputType, Uri uri, DateTimeOffset windowEnd, DateTimeOffset windowStart) : base(jobInputType, uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + WindowEnd = windowEnd; + WindowStart = windowStart; + InputDataType = MonitoringInputDataType.Static; + } + + /// Initializes a new instance of StaticInputData. + /// Mapping of column names to special uses. + /// The context metadata of the data source. + /// [Required] Specifies the type of signal to monitor. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + /// The ARM resource ID of the component resource used to preprocess the data. + /// [Required] The end date of the data window. + /// [Required] The start date of the data window. + internal StaticInputData(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri, string preprocessingComponentId, DateTimeOffset windowEnd, DateTimeOffset windowStart) : base(columns, dataContext, inputDataType, jobInputType, uri) + { + PreprocessingComponentId = preprocessingComponentId; + WindowEnd = windowEnd; + WindowStart = windowStart; + InputDataType = inputDataType; + } + + /// The ARM resource ID of the component resource used to preprocess the data. + public string PreprocessingComponentId { get; set; } + /// [Required] The end date of the data window. + public DateTimeOffset WindowEnd { get; set; } + /// [Required] The start date of the data window. + public DateTimeOffset WindowStart { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.Serialization.cs new file mode 100644 index 0000000000000..7d030a703d657 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class StorageAccountDetails : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SystemCreatedStorageAccount)) + { + if (SystemCreatedStorageAccount != null) + { + writer.WritePropertyName("systemCreatedStorageAccount"u8); + writer.WriteObjectValue(SystemCreatedStorageAccount); + } + else + { + writer.WriteNull("systemCreatedStorageAccount"); + } + } + if (Optional.IsDefined(UserCreatedStorageAccount)) + { + if (UserCreatedStorageAccount != null) + { + writer.WritePropertyName("userCreatedStorageAccount"u8); + writer.WriteObjectValue(UserCreatedStorageAccount); + } + else + { + writer.WriteNull("userCreatedStorageAccount"); + } + } + writer.WriteEndObject(); + } + + internal static StorageAccountDetails DeserializeStorageAccountDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional systemCreatedStorageAccount = default; + Optional userCreatedStorageAccount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("systemCreatedStorageAccount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + systemCreatedStorageAccount = null; + continue; + } + systemCreatedStorageAccount = SystemCreatedStorageAccount.DeserializeSystemCreatedStorageAccount(property.Value); + continue; + } + if (property.NameEquals("userCreatedStorageAccount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + userCreatedStorageAccount = null; + continue; + } + userCreatedStorageAccount = UserCreatedStorageAccount.DeserializeUserCreatedStorageAccount(property.Value); + continue; + } + } + return new StorageAccountDetails(systemCreatedStorageAccount.Value, userCreatedStorageAccount.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.cs new file mode 100644 index 0000000000000..2234d504a59bb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountDetails.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Details of storage account to be used for the Registry. + public partial class StorageAccountDetails + { + /// Initializes a new instance of StorageAccountDetails. + public StorageAccountDetails() + { + } + + /// Initializes a new instance of StorageAccountDetails. + /// Details of system created storage account to be used for the registry. + /// Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided. + internal StorageAccountDetails(SystemCreatedStorageAccount systemCreatedStorageAccount, UserCreatedStorageAccount userCreatedStorageAccount) + { + SystemCreatedStorageAccount = systemCreatedStorageAccount; + UserCreatedStorageAccount = userCreatedStorageAccount; + } + + /// Details of system created storage account to be used for the registry. + public SystemCreatedStorageAccount SystemCreatedStorageAccount { get; set; } + /// Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided. + internal UserCreatedStorageAccount UserCreatedStorageAccount { get; set; } + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ArmResourceId + { + get => UserCreatedStorageAccount is null ? default : UserCreatedStorageAccount.ArmResourceId; + set + { + if (UserCreatedStorageAccount is null) + UserCreatedStorageAccount = new UserCreatedStorageAccount(); + UserCreatedStorageAccount.ArmResourceId = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.Serialization.cs new file mode 100644 index 0000000000000..6326a8aa991a9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SystemCreatedAcrAccount : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AcrAccountName)) + { + if (AcrAccountName != null) + { + writer.WritePropertyName("acrAccountName"u8); + writer.WriteStringValue(AcrAccountName); + } + else + { + writer.WriteNull("acrAccountName"); + } + } + if (Optional.IsDefined(AcrAccountSku)) + { + if (AcrAccountSku != null) + { + writer.WritePropertyName("acrAccountSku"u8); + writer.WriteStringValue(AcrAccountSku); + } + else + { + writer.WriteNull("acrAccountSku"); + } + } + if (Optional.IsDefined(ArmResourceIdentifier)) + { + if (ArmResourceIdentifier != null) + { + writer.WritePropertyName("armResourceId"u8); + writer.WriteObjectValue(ArmResourceIdentifier); + } + else + { + writer.WriteNull("armResourceId"); + } + } + writer.WriteEndObject(); + } + + internal static SystemCreatedAcrAccount DeserializeSystemCreatedAcrAccount(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional acrAccountName = default; + Optional acrAccountSku = default; + Optional armResourceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("acrAccountName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + acrAccountName = null; + continue; + } + acrAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("acrAccountSku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + acrAccountSku = null; + continue; + } + acrAccountSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("armResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + armResourceId = null; + continue; + } + armResourceId = Models.ArmResourceId.DeserializeArmResourceId(property.Value); + continue; + } + } + return new SystemCreatedAcrAccount(acrAccountName.Value, acrAccountSku.Value, armResourceId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.cs new file mode 100644 index 0000000000000..0a751f2c75c02 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedAcrAccount.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The SystemCreatedAcrAccount. + public partial class SystemCreatedAcrAccount + { + /// Initializes a new instance of SystemCreatedAcrAccount. + public SystemCreatedAcrAccount() + { + } + + /// Initializes a new instance of SystemCreatedAcrAccount. + /// Name of the ACR account. + /// SKU of the ACR account. + /// This is populated once the ACR account is created. + internal SystemCreatedAcrAccount(string acrAccountName, string acrAccountSku, ArmResourceId armResourceIdentifier) + { + AcrAccountName = acrAccountName; + AcrAccountSku = acrAccountSku; + ArmResourceIdentifier = armResourceIdentifier; + } + + /// Name of the ACR account. + public string AcrAccountName { get; set; } + /// SKU of the ACR account. + public string AcrAccountSku { get; set; } + /// This is populated once the ACR account is created. + internal ArmResourceId ArmResourceIdentifier { get; set; } + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ArmResourceId + { + get => ArmResourceIdentifier is null ? default : ArmResourceIdentifier.ResourceId; + set + { + if (ArmResourceIdentifier is null) + ArmResourceIdentifier = new ArmResourceId(); + ArmResourceIdentifier.ResourceId = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.Serialization.cs new file mode 100644 index 0000000000000..a1e1d27851ab3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class SystemCreatedStorageAccount : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AllowBlobPublicAccess)) + { + writer.WritePropertyName("allowBlobPublicAccess"u8); + writer.WriteBooleanValue(AllowBlobPublicAccess.Value); + } + if (Optional.IsDefined(ArmResourceIdentifier)) + { + if (ArmResourceIdentifier != null) + { + writer.WritePropertyName("armResourceId"u8); + writer.WriteObjectValue(ArmResourceIdentifier); + } + else + { + writer.WriteNull("armResourceId"); + } + } + if (Optional.IsDefined(StorageAccountHnsEnabled)) + { + writer.WritePropertyName("storageAccountHnsEnabled"u8); + writer.WriteBooleanValue(StorageAccountHnsEnabled.Value); + } + if (Optional.IsDefined(StorageAccountName)) + { + if (StorageAccountName != null) + { + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + } + else + { + writer.WriteNull("storageAccountName"); + } + } + if (Optional.IsDefined(StorageAccountType)) + { + if (StorageAccountType != null) + { + writer.WritePropertyName("storageAccountType"u8); + writer.WriteStringValue(StorageAccountType); + } + else + { + writer.WriteNull("storageAccountType"); + } + } + writer.WriteEndObject(); + } + + internal static SystemCreatedStorageAccount DeserializeSystemCreatedStorageAccount(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional allowBlobPublicAccess = default; + Optional armResourceId = default; + Optional storageAccountHnsEnabled = default; + Optional storageAccountName = default; + Optional storageAccountType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowBlobPublicAccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowBlobPublicAccess = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("armResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + armResourceId = null; + continue; + } + armResourceId = Models.ArmResourceId.DeserializeArmResourceId(property.Value); + continue; + } + if (property.NameEquals("storageAccountHnsEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageAccountHnsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("storageAccountName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + storageAccountName = null; + continue; + } + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + storageAccountType = null; + continue; + } + storageAccountType = property.Value.GetString(); + continue; + } + } + return new SystemCreatedStorageAccount(Optional.ToNullable(allowBlobPublicAccess), armResourceId.Value, Optional.ToNullable(storageAccountHnsEnabled), storageAccountName.Value, storageAccountType.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.cs new file mode 100644 index 0000000000000..bc37693186435 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemCreatedStorageAccount.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The SystemCreatedStorageAccount. + public partial class SystemCreatedStorageAccount + { + /// Initializes a new instance of SystemCreatedStorageAccount. + public SystemCreatedStorageAccount() + { + } + + /// Initializes a new instance of SystemCreatedStorageAccount. + /// Public blob access allowed. + /// This is populated once the storage account is created. + /// HNS enabled for storage account. + /// Name of the storage account. + /// + /// Allowed values: + /// "Standard_LRS", + /// "Standard_GRS", + /// "Standard_RAGRS", + /// "Standard_ZRS", + /// "Standard_GZRS", + /// "Standard_RAGZRS", + /// "Premium_LRS", + /// "Premium_ZRS" + /// + internal SystemCreatedStorageAccount(bool? allowBlobPublicAccess, ArmResourceId armResourceIdentifier, bool? storageAccountHnsEnabled, string storageAccountName, string storageAccountType) + { + AllowBlobPublicAccess = allowBlobPublicAccess; + ArmResourceIdentifier = armResourceIdentifier; + StorageAccountHnsEnabled = storageAccountHnsEnabled; + StorageAccountName = storageAccountName; + StorageAccountType = storageAccountType; + } + + /// Public blob access allowed. + public bool? AllowBlobPublicAccess { get; set; } + /// This is populated once the storage account is created. + internal ArmResourceId ArmResourceIdentifier { get; set; } + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ArmResourceId + { + get => ArmResourceIdentifier is null ? default : ArmResourceIdentifier.ResourceId; + set + { + if (ArmResourceIdentifier is null) + ArmResourceIdentifier = new ArmResourceId(); + ArmResourceIdentifier.ResourceId = value; + } + } + + /// HNS enabled for storage account. + public bool? StorageAccountHnsEnabled { get; set; } + /// Name of the storage account. + public string StorageAccountName { get; set; } + /// + /// Allowed values: + /// "Standard_LRS", + /// "Standard_GRS", + /// "Standard_RAGRS", + /// "Standard_ZRS", + /// "Standard_GZRS", + /// "Standard_RAGZRS", + /// "Premium_LRS", + /// "Premium_ZRS" + /// + public string StorageAccountType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.Serialization.cs new file mode 100644 index 0000000000000..731d2a685d0a1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.Serialization.cs @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class TableFixedParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Booster)) + { + if (Booster != null) + { + writer.WritePropertyName("booster"u8); + writer.WriteStringValue(Booster); + } + else + { + writer.WriteNull("booster"); + } + } + if (Optional.IsDefined(BoostingType)) + { + if (BoostingType != null) + { + writer.WritePropertyName("boostingType"u8); + writer.WriteStringValue(BoostingType); + } + else + { + writer.WriteNull("boostingType"); + } + } + if (Optional.IsDefined(GrowPolicy)) + { + if (GrowPolicy != null) + { + writer.WritePropertyName("growPolicy"u8); + writer.WriteStringValue(GrowPolicy); + } + else + { + writer.WriteNull("growPolicy"); + } + } + if (Optional.IsDefined(LearningRate)) + { + if (LearningRate != null) + { + writer.WritePropertyName("learningRate"u8); + writer.WriteNumberValue(LearningRate.Value); + } + else + { + writer.WriteNull("learningRate"); + } + } + if (Optional.IsDefined(MaxBin)) + { + if (MaxBin != null) + { + writer.WritePropertyName("maxBin"u8); + writer.WriteNumberValue(MaxBin.Value); + } + else + { + writer.WriteNull("maxBin"); + } + } + if (Optional.IsDefined(MaxDepth)) + { + if (MaxDepth != null) + { + writer.WritePropertyName("maxDepth"u8); + writer.WriteNumberValue(MaxDepth.Value); + } + else + { + writer.WriteNull("maxDepth"); + } + } + if (Optional.IsDefined(MaxLeaves)) + { + if (MaxLeaves != null) + { + writer.WritePropertyName("maxLeaves"u8); + writer.WriteNumberValue(MaxLeaves.Value); + } + else + { + writer.WriteNull("maxLeaves"); + } + } + if (Optional.IsDefined(MinDataInLeaf)) + { + if (MinDataInLeaf != null) + { + writer.WritePropertyName("minDataInLeaf"u8); + writer.WriteNumberValue(MinDataInLeaf.Value); + } + else + { + writer.WriteNull("minDataInLeaf"); + } + } + if (Optional.IsDefined(MinSplitGain)) + { + if (MinSplitGain != null) + { + writer.WritePropertyName("minSplitGain"u8); + writer.WriteNumberValue(MinSplitGain.Value); + } + else + { + writer.WriteNull("minSplitGain"); + } + } + if (Optional.IsDefined(ModelName)) + { + if (ModelName != null) + { + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + } + else + { + writer.WriteNull("modelName"); + } + } + if (Optional.IsDefined(NEstimators)) + { + if (NEstimators != null) + { + writer.WritePropertyName("nEstimators"u8); + writer.WriteNumberValue(NEstimators.Value); + } + else + { + writer.WriteNull("nEstimators"); + } + } + if (Optional.IsDefined(NumLeaves)) + { + if (NumLeaves != null) + { + writer.WritePropertyName("numLeaves"u8); + writer.WriteNumberValue(NumLeaves.Value); + } + else + { + writer.WriteNull("numLeaves"); + } + } + if (Optional.IsDefined(PreprocessorName)) + { + if (PreprocessorName != null) + { + writer.WritePropertyName("preprocessorName"u8); + writer.WriteStringValue(PreprocessorName); + } + else + { + writer.WriteNull("preprocessorName"); + } + } + if (Optional.IsDefined(RegAlpha)) + { + if (RegAlpha != null) + { + writer.WritePropertyName("regAlpha"u8); + writer.WriteNumberValue(RegAlpha.Value); + } + else + { + writer.WriteNull("regAlpha"); + } + } + if (Optional.IsDefined(RegLambda)) + { + if (RegLambda != null) + { + writer.WritePropertyName("regLambda"u8); + writer.WriteNumberValue(RegLambda.Value); + } + else + { + writer.WriteNull("regLambda"); + } + } + if (Optional.IsDefined(Subsample)) + { + if (Subsample != null) + { + writer.WritePropertyName("subsample"u8); + writer.WriteNumberValue(Subsample.Value); + } + else + { + writer.WriteNull("subsample"); + } + } + if (Optional.IsDefined(SubsampleFreq)) + { + if (SubsampleFreq != null) + { + writer.WritePropertyName("subsampleFreq"u8); + writer.WriteNumberValue(SubsampleFreq.Value); + } + else + { + writer.WriteNull("subsampleFreq"); + } + } + if (Optional.IsDefined(TreeMethod)) + { + if (TreeMethod != null) + { + writer.WritePropertyName("treeMethod"u8); + writer.WriteStringValue(TreeMethod); + } + else + { + writer.WriteNull("treeMethod"); + } + } + if (Optional.IsDefined(WithMean)) + { + writer.WritePropertyName("withMean"u8); + writer.WriteBooleanValue(WithMean.Value); + } + if (Optional.IsDefined(WithStd)) + { + writer.WritePropertyName("withStd"u8); + writer.WriteBooleanValue(WithStd.Value); + } + writer.WriteEndObject(); + } + + internal static TableFixedParameters DeserializeTableFixedParameters(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional booster = default; + Optional boostingType = default; + Optional growPolicy = default; + Optional learningRate = default; + Optional maxBin = default; + Optional maxDepth = default; + Optional maxLeaves = default; + Optional minDataInLeaf = default; + Optional minSplitGain = default; + Optional modelName = default; + Optional nEstimators = default; + Optional numLeaves = default; + Optional preprocessorName = default; + Optional regAlpha = default; + Optional regLambda = default; + Optional subsample = default; + Optional subsampleFreq = default; + Optional treeMethod = default; + Optional withMean = default; + Optional withStd = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("booster"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + booster = null; + continue; + } + booster = property.Value.GetString(); + continue; + } + if (property.NameEquals("boostingType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + boostingType = null; + continue; + } + boostingType = property.Value.GetString(); + continue; + } + if (property.NameEquals("growPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + growPolicy = null; + continue; + } + growPolicy = property.Value.GetString(); + continue; + } + if (property.NameEquals("learningRate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + learningRate = null; + continue; + } + learningRate = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("maxBin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxBin = null; + continue; + } + maxBin = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxDepth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxDepth = null; + continue; + } + maxDepth = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxLeaves"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxLeaves = null; + continue; + } + maxLeaves = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minDataInLeaf"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + minDataInLeaf = null; + continue; + } + minDataInLeaf = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minSplitGain"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + minSplitGain = null; + continue; + } + minSplitGain = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("modelName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelName = null; + continue; + } + modelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("nEstimators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nEstimators = null; + continue; + } + nEstimators = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numLeaves"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + numLeaves = null; + continue; + } + numLeaves = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("preprocessorName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + preprocessorName = null; + continue; + } + preprocessorName = property.Value.GetString(); + continue; + } + if (property.NameEquals("regAlpha"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + regAlpha = null; + continue; + } + regAlpha = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("regLambda"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + regLambda = null; + continue; + } + regLambda = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("subsample"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subsample = null; + continue; + } + subsample = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("subsampleFreq"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subsampleFreq = null; + continue; + } + subsampleFreq = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("treeMethod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + treeMethod = null; + continue; + } + treeMethod = property.Value.GetString(); + continue; + } + if (property.NameEquals("withMean"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + withMean = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("withStd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + withStd = property.Value.GetBoolean(); + continue; + } + } + return new TableFixedParameters(booster.Value, boostingType.Value, growPolicy.Value, Optional.ToNullable(learningRate), Optional.ToNullable(maxBin), Optional.ToNullable(maxDepth), Optional.ToNullable(maxLeaves), Optional.ToNullable(minDataInLeaf), Optional.ToNullable(minSplitGain), modelName.Value, Optional.ToNullable(nEstimators), Optional.ToNullable(numLeaves), preprocessorName.Value, Optional.ToNullable(regAlpha), Optional.ToNullable(regLambda), Optional.ToNullable(subsample), Optional.ToNullable(subsampleFreq), treeMethod.Value, Optional.ToNullable(withMean), Optional.ToNullable(withStd)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.cs new file mode 100644 index 0000000000000..93dea981087b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableFixedParameters.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Fixed training parameters that won't be swept over during AutoML Table training. + public partial class TableFixedParameters + { + /// Initializes a new instance of TableFixedParameters. + public TableFixedParameters() + { + } + + /// Initializes a new instance of TableFixedParameters. + /// Specify the boosting type, e.g gbdt for XGBoost. + /// Specify the boosting type, e.g gbdt for LightGBM. + /// Specify the grow policy, which controls the way new nodes are added to the tree. + /// The learning rate for the training procedure. + /// Specify the Maximum number of discrete bins to bucket continuous features . + /// Specify the max depth to limit the tree depth explicitly. + /// Specify the max leaves to limit the tree leaves explicitly. + /// The minimum number of data per leaf. + /// Minimum loss reduction required to make a further partition on a leaf node of the tree. + /// The name of the model to train. + /// Specify the number of trees (or rounds) in an model. + /// Specify the number of leaves. + /// The name of the preprocessor to use. + /// L1 regularization term on weights. + /// L2 regularization term on weights. + /// Subsample ratio of the training instance. + /// Frequency of subsample. + /// Specify the tree method. + /// If true, center before scaling the data with StandardScalar. + /// If true, scaling the data with Unit Variance with StandardScalar. + internal TableFixedParameters(string booster, string boostingType, string growPolicy, double? learningRate, int? maxBin, int? maxDepth, int? maxLeaves, int? minDataInLeaf, double? minSplitGain, string modelName, int? nEstimators, int? numLeaves, string preprocessorName, double? regAlpha, double? regLambda, double? subsample, double? subsampleFreq, string treeMethod, bool? withMean, bool? withStd) + { + Booster = booster; + BoostingType = boostingType; + GrowPolicy = growPolicy; + LearningRate = learningRate; + MaxBin = maxBin; + MaxDepth = maxDepth; + MaxLeaves = maxLeaves; + MinDataInLeaf = minDataInLeaf; + MinSplitGain = minSplitGain; + ModelName = modelName; + NEstimators = nEstimators; + NumLeaves = numLeaves; + PreprocessorName = preprocessorName; + RegAlpha = regAlpha; + RegLambda = regLambda; + Subsample = subsample; + SubsampleFreq = subsampleFreq; + TreeMethod = treeMethod; + WithMean = withMean; + WithStd = withStd; + } + + /// Specify the boosting type, e.g gbdt for XGBoost. + public string Booster { get; set; } + /// Specify the boosting type, e.g gbdt for LightGBM. + public string BoostingType { get; set; } + /// Specify the grow policy, which controls the way new nodes are added to the tree. + public string GrowPolicy { get; set; } + /// The learning rate for the training procedure. + public double? LearningRate { get; set; } + /// Specify the Maximum number of discrete bins to bucket continuous features . + public int? MaxBin { get; set; } + /// Specify the max depth to limit the tree depth explicitly. + public int? MaxDepth { get; set; } + /// Specify the max leaves to limit the tree leaves explicitly. + public int? MaxLeaves { get; set; } + /// The minimum number of data per leaf. + public int? MinDataInLeaf { get; set; } + /// Minimum loss reduction required to make a further partition on a leaf node of the tree. + public double? MinSplitGain { get; set; } + /// The name of the model to train. + public string ModelName { get; set; } + /// Specify the number of trees (or rounds) in an model. + public int? NEstimators { get; set; } + /// Specify the number of leaves. + public int? NumLeaves { get; set; } + /// The name of the preprocessor to use. + public string PreprocessorName { get; set; } + /// L1 regularization term on weights. + public double? RegAlpha { get; set; } + /// L2 regularization term on weights. + public double? RegLambda { get; set; } + /// Subsample ratio of the training instance. + public double? Subsample { get; set; } + /// Frequency of subsample. + public double? SubsampleFreq { get; set; } + /// Specify the tree method. + public string TreeMethod { get; set; } + /// If true, center before scaling the data with StandardScalar. + public bool? WithMean { get; set; } + /// If true, scaling the data with Unit Variance with StandardScalar. + public bool? WithStd { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.Serialization.cs new file mode 100644 index 0000000000000..d9251975a8604 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.Serialization.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class TableParameterSubspace : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Booster)) + { + if (Booster != null) + { + writer.WritePropertyName("booster"u8); + writer.WriteStringValue(Booster); + } + else + { + writer.WriteNull("booster"); + } + } + if (Optional.IsDefined(BoostingType)) + { + if (BoostingType != null) + { + writer.WritePropertyName("boostingType"u8); + writer.WriteStringValue(BoostingType); + } + else + { + writer.WriteNull("boostingType"); + } + } + if (Optional.IsDefined(GrowPolicy)) + { + if (GrowPolicy != null) + { + writer.WritePropertyName("growPolicy"u8); + writer.WriteStringValue(GrowPolicy); + } + else + { + writer.WriteNull("growPolicy"); + } + } + if (Optional.IsDefined(LearningRate)) + { + if (LearningRate != null) + { + writer.WritePropertyName("learningRate"u8); + writer.WriteStringValue(LearningRate); + } + else + { + writer.WriteNull("learningRate"); + } + } + if (Optional.IsDefined(MaxBin)) + { + if (MaxBin != null) + { + writer.WritePropertyName("maxBin"u8); + writer.WriteStringValue(MaxBin); + } + else + { + writer.WriteNull("maxBin"); + } + } + if (Optional.IsDefined(MaxDepth)) + { + if (MaxDepth != null) + { + writer.WritePropertyName("maxDepth"u8); + writer.WriteStringValue(MaxDepth); + } + else + { + writer.WriteNull("maxDepth"); + } + } + if (Optional.IsDefined(MaxLeaves)) + { + if (MaxLeaves != null) + { + writer.WritePropertyName("maxLeaves"u8); + writer.WriteStringValue(MaxLeaves); + } + else + { + writer.WriteNull("maxLeaves"); + } + } + if (Optional.IsDefined(MinDataInLeaf)) + { + if (MinDataInLeaf != null) + { + writer.WritePropertyName("minDataInLeaf"u8); + writer.WriteStringValue(MinDataInLeaf); + } + else + { + writer.WriteNull("minDataInLeaf"); + } + } + if (Optional.IsDefined(MinSplitGain)) + { + if (MinSplitGain != null) + { + writer.WritePropertyName("minSplitGain"u8); + writer.WriteStringValue(MinSplitGain); + } + else + { + writer.WriteNull("minSplitGain"); + } + } + if (Optional.IsDefined(ModelName)) + { + if (ModelName != null) + { + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + } + else + { + writer.WriteNull("modelName"); + } + } + if (Optional.IsDefined(NEstimators)) + { + if (NEstimators != null) + { + writer.WritePropertyName("nEstimators"u8); + writer.WriteStringValue(NEstimators); + } + else + { + writer.WriteNull("nEstimators"); + } + } + if (Optional.IsDefined(NumLeaves)) + { + if (NumLeaves != null) + { + writer.WritePropertyName("numLeaves"u8); + writer.WriteStringValue(NumLeaves); + } + else + { + writer.WriteNull("numLeaves"); + } + } + if (Optional.IsDefined(PreprocessorName)) + { + if (PreprocessorName != null) + { + writer.WritePropertyName("preprocessorName"u8); + writer.WriteStringValue(PreprocessorName); + } + else + { + writer.WriteNull("preprocessorName"); + } + } + if (Optional.IsDefined(RegAlpha)) + { + if (RegAlpha != null) + { + writer.WritePropertyName("regAlpha"u8); + writer.WriteStringValue(RegAlpha); + } + else + { + writer.WriteNull("regAlpha"); + } + } + if (Optional.IsDefined(RegLambda)) + { + if (RegLambda != null) + { + writer.WritePropertyName("regLambda"u8); + writer.WriteStringValue(RegLambda); + } + else + { + writer.WriteNull("regLambda"); + } + } + if (Optional.IsDefined(Subsample)) + { + if (Subsample != null) + { + writer.WritePropertyName("subsample"u8); + writer.WriteStringValue(Subsample); + } + else + { + writer.WriteNull("subsample"); + } + } + if (Optional.IsDefined(SubsampleFreq)) + { + if (SubsampleFreq != null) + { + writer.WritePropertyName("subsampleFreq"u8); + writer.WriteStringValue(SubsampleFreq); + } + else + { + writer.WriteNull("subsampleFreq"); + } + } + if (Optional.IsDefined(TreeMethod)) + { + if (TreeMethod != null) + { + writer.WritePropertyName("treeMethod"u8); + writer.WriteStringValue(TreeMethod); + } + else + { + writer.WriteNull("treeMethod"); + } + } + if (Optional.IsDefined(WithMean)) + { + if (WithMean != null) + { + writer.WritePropertyName("withMean"u8); + writer.WriteStringValue(WithMean); + } + else + { + writer.WriteNull("withMean"); + } + } + if (Optional.IsDefined(WithStd)) + { + if (WithStd != null) + { + writer.WritePropertyName("withStd"u8); + writer.WriteStringValue(WithStd); + } + else + { + writer.WriteNull("withStd"); + } + } + writer.WriteEndObject(); + } + + internal static TableParameterSubspace DeserializeTableParameterSubspace(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional booster = default; + Optional boostingType = default; + Optional growPolicy = default; + Optional learningRate = default; + Optional maxBin = default; + Optional maxDepth = default; + Optional maxLeaves = default; + Optional minDataInLeaf = default; + Optional minSplitGain = default; + Optional modelName = default; + Optional nEstimators = default; + Optional numLeaves = default; + Optional preprocessorName = default; + Optional regAlpha = default; + Optional regLambda = default; + Optional subsample = default; + Optional subsampleFreq = default; + Optional treeMethod = default; + Optional withMean = default; + Optional withStd = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("booster"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + booster = null; + continue; + } + booster = property.Value.GetString(); + continue; + } + if (property.NameEquals("boostingType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + boostingType = null; + continue; + } + boostingType = property.Value.GetString(); + continue; + } + if (property.NameEquals("growPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + growPolicy = null; + continue; + } + growPolicy = property.Value.GetString(); + continue; + } + if (property.NameEquals("learningRate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + learningRate = null; + continue; + } + learningRate = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxBin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxBin = null; + continue; + } + maxBin = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxDepth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxDepth = null; + continue; + } + maxDepth = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxLeaves"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxLeaves = null; + continue; + } + maxLeaves = property.Value.GetString(); + continue; + } + if (property.NameEquals("minDataInLeaf"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + minDataInLeaf = null; + continue; + } + minDataInLeaf = property.Value.GetString(); + continue; + } + if (property.NameEquals("minSplitGain"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + minSplitGain = null; + continue; + } + minSplitGain = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelName = null; + continue; + } + modelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("nEstimators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nEstimators = null; + continue; + } + nEstimators = property.Value.GetString(); + continue; + } + if (property.NameEquals("numLeaves"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + numLeaves = null; + continue; + } + numLeaves = property.Value.GetString(); + continue; + } + if (property.NameEquals("preprocessorName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + preprocessorName = null; + continue; + } + preprocessorName = property.Value.GetString(); + continue; + } + if (property.NameEquals("regAlpha"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + regAlpha = null; + continue; + } + regAlpha = property.Value.GetString(); + continue; + } + if (property.NameEquals("regLambda"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + regLambda = null; + continue; + } + regLambda = property.Value.GetString(); + continue; + } + if (property.NameEquals("subsample"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subsample = null; + continue; + } + subsample = property.Value.GetString(); + continue; + } + if (property.NameEquals("subsampleFreq"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subsampleFreq = null; + continue; + } + subsampleFreq = property.Value.GetString(); + continue; + } + if (property.NameEquals("treeMethod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + treeMethod = null; + continue; + } + treeMethod = property.Value.GetString(); + continue; + } + if (property.NameEquals("withMean"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + withMean = null; + continue; + } + withMean = property.Value.GetString(); + continue; + } + if (property.NameEquals("withStd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + withStd = null; + continue; + } + withStd = property.Value.GetString(); + continue; + } + } + return new TableParameterSubspace(booster.Value, boostingType.Value, growPolicy.Value, learningRate.Value, maxBin.Value, maxDepth.Value, maxLeaves.Value, minDataInLeaf.Value, minSplitGain.Value, modelName.Value, nEstimators.Value, numLeaves.Value, preprocessorName.Value, regAlpha.Value, regLambda.Value, subsample.Value, subsampleFreq.Value, treeMethod.Value, withMean.Value, withStd.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.cs new file mode 100644 index 0000000000000..5536162c889c5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableParameterSubspace.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The TableParameterSubspace. + public partial class TableParameterSubspace + { + /// Initializes a new instance of TableParameterSubspace. + public TableParameterSubspace() + { + } + + /// Initializes a new instance of TableParameterSubspace. + /// Specify the boosting type, e.g gbdt for XGBoost. + /// Specify the boosting type, e.g gbdt for LightGBM. + /// Specify the grow policy, which controls the way new nodes are added to the tree. + /// The learning rate for the training procedure. + /// Specify the Maximum number of discrete bins to bucket continuous features . + /// Specify the max depth to limit the tree depth explicitly. + /// Specify the max leaves to limit the tree leaves explicitly. + /// The minimum number of data per leaf. + /// Minimum loss reduction required to make a further partition on a leaf node of the tree. + /// The name of the model to train. + /// Specify the number of trees (or rounds) in an model. + /// Specify the number of leaves. + /// The name of the preprocessor to use. + /// L1 regularization term on weights. + /// L2 regularization term on weights. + /// Subsample ratio of the training instance. + /// Frequency of subsample. + /// Specify the tree method. + /// If true, center before scaling the data with StandardScalar. + /// If true, scaling the data with Unit Variance with StandardScalar. + internal TableParameterSubspace(string booster, string boostingType, string growPolicy, string learningRate, string maxBin, string maxDepth, string maxLeaves, string minDataInLeaf, string minSplitGain, string modelName, string nEstimators, string numLeaves, string preprocessorName, string regAlpha, string regLambda, string subsample, string subsampleFreq, string treeMethod, string withMean, string withStd) + { + Booster = booster; + BoostingType = boostingType; + GrowPolicy = growPolicy; + LearningRate = learningRate; + MaxBin = maxBin; + MaxDepth = maxDepth; + MaxLeaves = maxLeaves; + MinDataInLeaf = minDataInLeaf; + MinSplitGain = minSplitGain; + ModelName = modelName; + NEstimators = nEstimators; + NumLeaves = numLeaves; + PreprocessorName = preprocessorName; + RegAlpha = regAlpha; + RegLambda = regLambda; + Subsample = subsample; + SubsampleFreq = subsampleFreq; + TreeMethod = treeMethod; + WithMean = withMean; + WithStd = withStd; + } + + /// Specify the boosting type, e.g gbdt for XGBoost. + public string Booster { get; set; } + /// Specify the boosting type, e.g gbdt for LightGBM. + public string BoostingType { get; set; } + /// Specify the grow policy, which controls the way new nodes are added to the tree. + public string GrowPolicy { get; set; } + /// The learning rate for the training procedure. + public string LearningRate { get; set; } + /// Specify the Maximum number of discrete bins to bucket continuous features . + public string MaxBin { get; set; } + /// Specify the max depth to limit the tree depth explicitly. + public string MaxDepth { get; set; } + /// Specify the max leaves to limit the tree leaves explicitly. + public string MaxLeaves { get; set; } + /// The minimum number of data per leaf. + public string MinDataInLeaf { get; set; } + /// Minimum loss reduction required to make a further partition on a leaf node of the tree. + public string MinSplitGain { get; set; } + /// The name of the model to train. + public string ModelName { get; set; } + /// Specify the number of trees (or rounds) in an model. + public string NEstimators { get; set; } + /// Specify the number of leaves. + public string NumLeaves { get; set; } + /// The name of the preprocessor to use. + public string PreprocessorName { get; set; } + /// L1 regularization term on weights. + public string RegAlpha { get; set; } + /// L2 regularization term on weights. + public string RegLambda { get; set; } + /// Subsample ratio of the training instance. + public string Subsample { get; set; } + /// Frequency of subsample. + public string SubsampleFreq { get; set; } + /// Specify the tree method. + public string TreeMethod { get; set; } + /// If true, center before scaling the data with StandardScalar. + public string WithMean { get; set; } + /// If true, scaling the data with Unit Variance with StandardScalar. + public string WithStd { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.Serialization.cs new file mode 100644 index 0000000000000..8238bae11f45b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class TableSweepSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EarlyTermination)) + { + if (EarlyTermination != null) + { + writer.WritePropertyName("earlyTermination"u8); + writer.WriteObjectValue(EarlyTermination); + } + else + { + writer.WriteNull("earlyTermination"); + } + } + writer.WritePropertyName("samplingAlgorithm"u8); + writer.WriteStringValue(SamplingAlgorithm.ToString()); + writer.WriteEndObject(); + } + + internal static TableSweepSettings DeserializeTableSweepSettings(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional earlyTermination = default; + SamplingAlgorithmType samplingAlgorithm = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("earlyTermination"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + earlyTermination = null; + continue; + } + earlyTermination = MachineLearningEarlyTerminationPolicy.DeserializeMachineLearningEarlyTerminationPolicy(property.Value); + continue; + } + if (property.NameEquals("samplingAlgorithm"u8)) + { + samplingAlgorithm = new SamplingAlgorithmType(property.Value.GetString()); + continue; + } + } + return new TableSweepSettings(earlyTermination.Value, samplingAlgorithm); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.cs new file mode 100644 index 0000000000000..249f6488eee03 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableSweepSettings.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The TableSweepSettings. + public partial class TableSweepSettings + { + /// Initializes a new instance of TableSweepSettings. + /// [Required] Type of sampling algorithm. + public TableSweepSettings(SamplingAlgorithmType samplingAlgorithm) + { + SamplingAlgorithm = samplingAlgorithm; + } + + /// Initializes a new instance of TableSweepSettings. + /// + /// Type of early termination policy for the sweeping job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// [Required] Type of sampling algorithm. + internal TableSweepSettings(MachineLearningEarlyTerminationPolicy earlyTermination, SamplingAlgorithmType samplingAlgorithm) + { + EarlyTermination = earlyTermination; + SamplingAlgorithm = samplingAlgorithm; + } + + /// + /// Type of early termination policy for the sweeping job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MachineLearningEarlyTerminationPolicy EarlyTermination { get; set; } + /// [Required] Type of sampling algorithm. + public SamplingAlgorithmType SamplingAlgorithm { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs index e0730f5f36b88..c5f28fe578e26 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs @@ -43,11 +43,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("maxCoresPerTrial"u8); writer.WriteNumberValue(MaxCoresPerTrial.Value); } + if (Optional.IsDefined(MaxNodes)) + { + writer.WritePropertyName("maxNodes"u8); + writer.WriteNumberValue(MaxNodes.Value); + } if (Optional.IsDefined(MaxTrials)) { writer.WritePropertyName("maxTrials"u8); writer.WriteNumberValue(MaxTrials.Value); } + if (Optional.IsDefined(SweepConcurrentTrials)) + { + writer.WritePropertyName("sweepConcurrentTrials"u8); + writer.WriteNumberValue(SweepConcurrentTrials.Value); + } + if (Optional.IsDefined(SweepTrials)) + { + writer.WritePropertyName("sweepTrials"u8); + writer.WriteNumberValue(SweepTrials.Value); + } if (Optional.IsDefined(Timeout)) { writer.WritePropertyName("timeout"u8); @@ -71,7 +86,10 @@ internal static TableVerticalLimitSettings DeserializeTableVerticalLimitSettings Optional exitScore = default; Optional maxConcurrentTrials = default; Optional maxCoresPerTrial = default; + Optional maxNodes = default; Optional maxTrials = default; + Optional sweepConcurrentTrials = default; + Optional sweepTrials = default; Optional timeout = default; Optional trialTimeout = default; foreach (var property in element.EnumerateObject()) @@ -113,6 +131,15 @@ internal static TableVerticalLimitSettings DeserializeTableVerticalLimitSettings maxCoresPerTrial = property.Value.GetInt32(); continue; } + if (property.NameEquals("maxNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxNodes = property.Value.GetInt32(); + continue; + } if (property.NameEquals("maxTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -122,6 +149,24 @@ internal static TableVerticalLimitSettings DeserializeTableVerticalLimitSettings maxTrials = property.Value.GetInt32(); continue; } + if (property.NameEquals("sweepConcurrentTrials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sweepConcurrentTrials = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sweepTrials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sweepTrials = property.Value.GetInt32(); + continue; + } if (property.NameEquals("timeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -141,7 +186,7 @@ internal static TableVerticalLimitSettings DeserializeTableVerticalLimitSettings continue; } } - return new TableVerticalLimitSettings(Optional.ToNullable(enableEarlyTermination), Optional.ToNullable(exitScore), Optional.ToNullable(maxConcurrentTrials), Optional.ToNullable(maxCoresPerTrial), Optional.ToNullable(maxTrials), Optional.ToNullable(timeout), Optional.ToNullable(trialTimeout)); + return new TableVerticalLimitSettings(Optional.ToNullable(enableEarlyTermination), Optional.ToNullable(exitScore), Optional.ToNullable(maxConcurrentTrials), Optional.ToNullable(maxCoresPerTrial), Optional.ToNullable(maxNodes), Optional.ToNullable(maxTrials), Optional.ToNullable(sweepConcurrentTrials), Optional.ToNullable(sweepTrials), Optional.ToNullable(timeout), Optional.ToNullable(trialTimeout)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs index 00cdd7a38a1c6..14f001ad5e3c5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs @@ -22,16 +22,22 @@ public TableVerticalLimitSettings() /// Exit score for the AutoML job. /// Maximum Concurrent iterations. /// Max cores per iteration. + /// Maximum nodes to use for the experiment. /// Number of iterations. + /// Number of concurrent sweeping runs that user wants to trigger. + /// Number of sweeping runs that user wants to trigger. /// AutoML job timeout. /// Iteration timeout. - internal TableVerticalLimitSettings(bool? enableEarlyTermination, double? exitScore, int? maxConcurrentTrials, int? maxCoresPerTrial, int? maxTrials, TimeSpan? timeout, TimeSpan? trialTimeout) + internal TableVerticalLimitSettings(bool? enableEarlyTermination, double? exitScore, int? maxConcurrentTrials, int? maxCoresPerTrial, int? maxNodes, int? maxTrials, int? sweepConcurrentTrials, int? sweepTrials, TimeSpan? timeout, TimeSpan? trialTimeout) { EnableEarlyTermination = enableEarlyTermination; ExitScore = exitScore; MaxConcurrentTrials = maxConcurrentTrials; MaxCoresPerTrial = maxCoresPerTrial; + MaxNodes = maxNodes; MaxTrials = maxTrials; + SweepConcurrentTrials = sweepConcurrentTrials; + SweepTrials = sweepTrials; Timeout = timeout; TrialTimeout = trialTimeout; } @@ -44,8 +50,14 @@ internal TableVerticalLimitSettings(bool? enableEarlyTermination, double? exitSc public int? MaxConcurrentTrials { get; set; } /// Max cores per iteration. public int? MaxCoresPerTrial { get; set; } + /// Maximum nodes to use for the experiment. + public int? MaxNodes { get; set; } /// Number of iterations. public int? MaxTrials { get; set; } + /// Number of concurrent sweeping runs that user wants to trigger. + public int? SweepConcurrentTrials { get; set; } + /// Number of sweeping runs that user wants to trigger. + public int? SweepTrials { get; set; } /// AutoML job timeout. public TimeSpan? Timeout { get; set; } /// Iteration timeout. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextAnnotationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextAnnotationType.cs new file mode 100644 index 0000000000000..33ff488d3e409 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextAnnotationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Annotation type of text data. + public readonly partial struct TextAnnotationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TextAnnotationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClassificationValue = "Classification"; + private const string NamedEntityRecognitionValue = "NamedEntityRecognition"; + + /// Classification. + public static TextAnnotationType Classification { get; } = new TextAnnotationType(ClassificationValue); + /// NamedEntityRecognition. + public static TextAnnotationType NamedEntityRecognition { get; } = new TextAnnotationType(NamedEntityRecognitionValue); + /// Determines if two values are the same. + public static bool operator ==(TextAnnotationType left, TextAnnotationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TextAnnotationType left, TextAnnotationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TextAnnotationType(string value) => new TextAnnotationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TextAnnotationType other && Equals(other); + /// + public bool Equals(TextAnnotationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs index 7671c49d3589b..68c7d0793ab9a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -32,6 +33,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("featurizationSettings"); } } + if (Optional.IsDefined(FixedParameters)) + { + if (FixedParameters != null) + { + writer.WritePropertyName("fixedParameters"u8); + writer.WriteObjectValue(FixedParameters); + } + else + { + writer.WriteNull("fixedParameters"); + } + } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -44,6 +57,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("limitSettings"); } } + if (Optional.IsCollectionDefined(SearchSpace)) + { + if (SearchSpace != null) + { + writer.WritePropertyName("searchSpace"u8); + writer.WriteStartArray(); + foreach (var item in SearchSpace) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("searchSpace"); + } + } + if (Optional.IsDefined(SweepSettings)) + { + if (SweepSettings != null) + { + writer.WritePropertyName("sweepSettings"u8); + writer.WriteObjectValue(SweepSettings); + } + else + { + writer.WriteNull("sweepSettings"); + } + } if (Optional.IsDefined(ValidationData)) { if (ValidationData != null) @@ -88,7 +130,10 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele } Optional primaryMetric = default; Optional featurizationSettings = default; + Optional fixedParameters = default; Optional limitSettings = default; + Optional> searchSpace = default; + Optional sweepSettings = default; Optional validationData = default; Optional logVerbosity = default; Optional targetColumnName = default; @@ -115,6 +160,16 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value); continue; } + if (property.NameEquals("fixedParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fixedParameters = null; + continue; + } + fixedParameters = NlpFixedParameters.DeserializeNlpFixedParameters(property.Value); + continue; + } if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -125,6 +180,31 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value); continue; } + if (property.NameEquals("searchSpace"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchSpace = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NlpParameterSubspace.DeserializeNlpParameterSubspace(item)); + } + searchSpace = array; + continue; + } + if (property.NameEquals("sweepSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sweepSettings = null; + continue; + } + sweepSettings = NlpSweepSettings.DeserializeNlpSweepSettings(property.Value); + continue; + } if (property.NameEquals("validationData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -165,7 +245,7 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele continue; } } - return new TextClassification(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), featurizationSettings.Value, limitSettings.Value, validationData.Value); + return new TextClassification(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), featurizationSettings.Value, fixedParameters.Value, limitSettings.Value, Optional.ToList(searchSpace), sweepSettings.Value, validationData.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs index 60dcf944e8312..de200a3e31fd8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.MachineLearning.Models @@ -23,6 +24,7 @@ public TextClassification(MachineLearningTableJobInput trainingData) : base(trai { Argument.AssertNotNull(trainingData, nameof(trainingData)); + SearchSpace = new ChangeTrackingList(); TaskType = TaskType.TextClassification; } @@ -36,13 +38,19 @@ public TextClassification(MachineLearningTableJobInput trainingData) : base(trai /// [Required] Training data input. /// Primary metric for Text-Classification task. /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Validation data inputs. - internal TextClassification(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal TextClassification(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpFixedParameters fixedParameters, NlpVerticalLimitSettings limitSettings, IList searchSpace, NlpSweepSettings sweepSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; FeaturizationSettings = featurizationSettings; + FixedParameters = fixedParameters; LimitSettings = limitSettings; + SearchSpace = searchSpace; + SweepSettings = sweepSettings; ValidationData = validationData; TaskType = taskType; } @@ -63,8 +71,14 @@ public string FeaturizationDatasetLanguage } } + /// Model/training parameters that will remain constant throughout training. + public NlpFixedParameters FixedParameters { get; set; } /// Execution constraints for AutoMLJob. public NlpVerticalLimitSettings LimitSettings { get; set; } + /// Search space for sampling different combinations of models and their hyperparameters. + public IList SearchSpace { get; set; } + /// Settings for model sweeping and hyperparameter tuning. + public NlpSweepSettings SweepSettings { get; set; } /// Validation data inputs. public MachineLearningTableJobInput ValidationData { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs index ffd4e66831d05..bccb794261641 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -27,6 +28,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("featurizationSettings"); } } + if (Optional.IsDefined(FixedParameters)) + { + if (FixedParameters != null) + { + writer.WritePropertyName("fixedParameters"u8); + writer.WriteObjectValue(FixedParameters); + } + else + { + writer.WriteNull("fixedParameters"); + } + } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -39,6 +52,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("limitSettings"); } } + if (Optional.IsCollectionDefined(SearchSpace)) + { + if (SearchSpace != null) + { + writer.WritePropertyName("searchSpace"u8); + writer.WriteStartArray(); + foreach (var item in SearchSpace) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("searchSpace"); + } + } + if (Optional.IsDefined(SweepSettings)) + { + if (SweepSettings != null) + { + writer.WritePropertyName("sweepSettings"u8); + writer.WriteObjectValue(SweepSettings); + } + else + { + writer.WriteNull("sweepSettings"); + } + } if (Optional.IsDefined(ValidationData)) { if (ValidationData != null) @@ -83,7 +125,10 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil } Optional primaryMetric = default; Optional featurizationSettings = default; + Optional fixedParameters = default; Optional limitSettings = default; + Optional> searchSpace = default; + Optional sweepSettings = default; Optional validationData = default; Optional logVerbosity = default; Optional targetColumnName = default; @@ -110,6 +155,16 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value); continue; } + if (property.NameEquals("fixedParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fixedParameters = null; + continue; + } + fixedParameters = NlpFixedParameters.DeserializeNlpFixedParameters(property.Value); + continue; + } if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -120,6 +175,31 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value); continue; } + if (property.NameEquals("searchSpace"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchSpace = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NlpParameterSubspace.DeserializeNlpParameterSubspace(item)); + } + searchSpace = array; + continue; + } + if (property.NameEquals("sweepSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sweepSettings = null; + continue; + } + sweepSettings = NlpSweepSettings.DeserializeNlpSweepSettings(property.Value); + continue; + } if (property.NameEquals("validationData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -160,7 +240,7 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil continue; } } - return new TextClassificationMultilabel(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), featurizationSettings.Value, limitSettings.Value, validationData.Value); + return new TextClassificationMultilabel(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), featurizationSettings.Value, fixedParameters.Value, limitSettings.Value, Optional.ToList(searchSpace), sweepSettings.Value, validationData.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs index a2b272c3304b4..7e5f27d081574 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.MachineLearning.Models @@ -23,6 +24,7 @@ public TextClassificationMultilabel(MachineLearningTableJobInput trainingData) : { Argument.AssertNotNull(trainingData, nameof(trainingData)); + SearchSpace = new ChangeTrackingList(); TaskType = TaskType.TextClassificationMultilabel; } @@ -39,13 +41,19 @@ public TextClassificationMultilabel(MachineLearningTableJobInput trainingData) : /// Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. /// /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Validation data inputs. - internal TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationMultilabelPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationMultilabelPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpFixedParameters fixedParameters, NlpVerticalLimitSettings limitSettings, IList searchSpace, NlpSweepSettings sweepSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; FeaturizationSettings = featurizationSettings; + FixedParameters = fixedParameters; LimitSettings = limitSettings; + SearchSpace = searchSpace; + SweepSettings = sweepSettings; ValidationData = validationData; TaskType = taskType; } @@ -69,8 +77,14 @@ public string FeaturizationDatasetLanguage } } + /// Model/training parameters that will remain constant throughout training. + public NlpFixedParameters FixedParameters { get; set; } /// Execution constraints for AutoMLJob. public NlpVerticalLimitSettings LimitSettings { get; set; } + /// Search space for sampling different combinations of models and their hyperparameters. + public IList SearchSpace { get; set; } + /// Settings for model sweeping and hyperparameter tuning. + public NlpSweepSettings SweepSettings { get; set; } /// Validation data inputs. public MachineLearningTableJobInput ValidationData { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs index f81cb2a0abfe0..0304d79fa7b3f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -27,6 +28,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("featurizationSettings"); } } + if (Optional.IsDefined(FixedParameters)) + { + if (FixedParameters != null) + { + writer.WritePropertyName("fixedParameters"u8); + writer.WriteObjectValue(FixedParameters); + } + else + { + writer.WriteNull("fixedParameters"); + } + } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -39,6 +52,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("limitSettings"); } } + if (Optional.IsCollectionDefined(SearchSpace)) + { + if (SearchSpace != null) + { + writer.WritePropertyName("searchSpace"u8); + writer.WriteStartArray(); + foreach (var item in SearchSpace) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("searchSpace"); + } + } + if (Optional.IsDefined(SweepSettings)) + { + if (SweepSettings != null) + { + writer.WritePropertyName("sweepSettings"u8); + writer.WriteObjectValue(SweepSettings); + } + else + { + writer.WriteNull("sweepSettings"); + } + } if (Optional.IsDefined(ValidationData)) { if (ValidationData != null) @@ -83,7 +125,10 @@ internal static TextNer DeserializeTextNer(JsonElement element) } Optional primaryMetric = default; Optional featurizationSettings = default; + Optional fixedParameters = default; Optional limitSettings = default; + Optional> searchSpace = default; + Optional sweepSettings = default; Optional validationData = default; Optional logVerbosity = default; Optional targetColumnName = default; @@ -110,6 +155,16 @@ internal static TextNer DeserializeTextNer(JsonElement element) featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value); continue; } + if (property.NameEquals("fixedParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fixedParameters = null; + continue; + } + fixedParameters = NlpFixedParameters.DeserializeNlpFixedParameters(property.Value); + continue; + } if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -120,6 +175,31 @@ internal static TextNer DeserializeTextNer(JsonElement element) limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value); continue; } + if (property.NameEquals("searchSpace"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchSpace = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NlpParameterSubspace.DeserializeNlpParameterSubspace(item)); + } + searchSpace = array; + continue; + } + if (property.NameEquals("sweepSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sweepSettings = null; + continue; + } + sweepSettings = NlpSweepSettings.DeserializeNlpSweepSettings(property.Value); + continue; + } if (property.NameEquals("validationData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -160,7 +240,7 @@ internal static TextNer DeserializeTextNer(JsonElement element) continue; } } - return new TextNer(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), featurizationSettings.Value, limitSettings.Value, validationData.Value); + return new TextNer(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), featurizationSettings.Value, fixedParameters.Value, limitSettings.Value, Optional.ToList(searchSpace), sweepSettings.Value, validationData.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs index befb91a55fc40..25c16194bd347 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.MachineLearning.Models @@ -24,6 +25,7 @@ public TextNer(MachineLearningTableJobInput trainingData) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); + SearchSpace = new ChangeTrackingList(); TaskType = TaskType.TextNER; } @@ -40,13 +42,19 @@ public TextNer(MachineLearningTableJobInput trainingData) : base(trainingData) /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. /// /// Featurization inputs needed for AutoML job. + /// Model/training parameters that will remain constant throughout training. /// Execution constraints for AutoMLJob. + /// Search space for sampling different combinations of models and their hyperparameters. + /// Settings for model sweeping and hyperparameter tuning. /// Validation data inputs. - internal TextNer(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal TextNer(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpFixedParameters fixedParameters, NlpVerticalLimitSettings limitSettings, IList searchSpace, NlpSweepSettings sweepSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; FeaturizationSettings = featurizationSettings; + FixedParameters = fixedParameters; LimitSettings = limitSettings; + SearchSpace = searchSpace; + SweepSettings = sweepSettings; ValidationData = validationData; TaskType = taskType; } @@ -70,8 +78,14 @@ public string FeaturizationDatasetLanguage } } + /// Model/training parameters that will remain constant throughout training. + public NlpFixedParameters FixedParameters { get; set; } /// Execution constraints for AutoMLJob. public NlpVerticalLimitSettings LimitSettings { get; set; } + /// Search space for sampling different combinations of models and their hyperparameters. + public IList SearchSpace { get; set; } + /// Settings for model sweeping and hyperparameter tuning. + public NlpSweepSettings SweepSettings { get; set; } /// Validation data inputs. public MachineLearningTableJobInput ValidationData { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.Serialization.cs new file mode 100644 index 0000000000000..5014b3c12fb31 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class TmpfsOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size.Value); + } + writer.WriteEndObject(); + } + + internal static TmpfsOptions DeserializeTmpfsOptions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional size = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("size"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + size = property.Value.GetInt32(); + continue; + } + } + return new TmpfsOptions(Optional.ToNullable(size)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs new file mode 100644 index 0000000000000..c3c29016b9b0d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The TmpfsOptions. + internal partial class TmpfsOptions + { + /// Initializes a new instance of TmpfsOptions. + public TmpfsOptions() + { + } + + /// Initializes a new instance of TmpfsOptions. + /// Mention the Tmpfs size. + internal TmpfsOptions(int? size) + { + Size = size; + } + + /// Mention the Tmpfs size. + public int? Size { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.Serialization.cs new file mode 100644 index 0000000000000..105992199a8e1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class TopNFeaturesByAttribution : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Top)) + { + writer.WritePropertyName("top"u8); + writer.WriteNumberValue(Top.Value); + } + writer.WritePropertyName("filterType"u8); + writer.WriteStringValue(FilterType.ToString()); + writer.WriteEndObject(); + } + + internal static TopNFeaturesByAttribution DeserializeTopNFeaturesByAttribution(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional top = default; + MonitoringFeatureFilterType filterType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("top"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + top = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("filterType"u8)) + { + filterType = new MonitoringFeatureFilterType(property.Value.GetString()); + continue; + } + } + return new TopNFeaturesByAttribution(filterType, Optional.ToNullable(top)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.cs new file mode 100644 index 0000000000000..d45d517a1760d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TopNFeaturesByAttribution.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The TopNFeaturesByAttribution. + public partial class TopNFeaturesByAttribution : MonitoringFeatureFilterBase + { + /// Initializes a new instance of TopNFeaturesByAttribution. + public TopNFeaturesByAttribution() + { + FilterType = MonitoringFeatureFilterType.TopNByAttribution; + } + + /// Initializes a new instance of TopNFeaturesByAttribution. + /// [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + /// The number of top features to include. + internal TopNFeaturesByAttribution(MonitoringFeatureFilterType filterType, int? top) : base(filterType) + { + Top = top; + FilterType = filterType; + } + + /// The number of top features to include. + public int? Top { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.Serialization.cs new file mode 100644 index 0000000000000..a059e59e1a117 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class TrailingInputData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PreprocessingComponentId)) + { + if (PreprocessingComponentId != null) + { + writer.WritePropertyName("preprocessingComponentId"u8); + writer.WriteStringValue(PreprocessingComponentId); + } + else + { + writer.WriteNull("preprocessingComponentId"); + } + } + writer.WritePropertyName("windowOffset"u8); + writer.WriteStringValue(WindowOffset, "P"); + writer.WritePropertyName("windowSize"u8); + writer.WriteStringValue(WindowSize, "P"); + if (Optional.IsCollectionDefined(Columns)) + { + if (Columns != null) + { + writer.WritePropertyName("columns"u8); + writer.WriteStartObject(); + foreach (var item in Columns) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("columns"); + } + } + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + writer.WriteEndObject(); + } + + internal static TrailingInputData DeserializeTrailingInputData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional preprocessingComponentId = default; + TimeSpan windowOffset = default; + TimeSpan windowSize = default; + Optional> columns = default; + Optional dataContext = default; + MonitoringInputDataType inputDataType = default; + JobInputType jobInputType = default; + Uri uri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("preprocessingComponentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + preprocessingComponentId = null; + continue; + } + preprocessingComponentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("windowOffset"u8)) + { + windowOffset = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("windowSize"u8)) + { + windowSize = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } + if (property.NameEquals("dataContext"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataContext = null; + continue; + } + dataContext = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputDataType"u8)) + { + inputDataType = new MonitoringInputDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobInputType"u8)) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } + } + return new TrailingInputData(Optional.ToDictionary(columns), dataContext.Value, inputDataType, jobInputType, uri, preprocessingComponentId.Value, windowOffset, windowSize); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.cs new file mode 100644 index 0000000000000..df973e8105235 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrailingInputData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Trailing input data definition. + public partial class TrailingInputData : MonitoringInputDataBase + { + /// Initializes a new instance of TrailingInputData. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + /// [Required] The time offset between the end of the data window and the monitor's current run time. + /// [Required] The size of the trailing data window. + /// is null. + public TrailingInputData(JobInputType jobInputType, Uri uri, TimeSpan windowOffset, TimeSpan windowSize) : base(jobInputType, uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + WindowOffset = windowOffset; + WindowSize = windowSize; + InputDataType = MonitoringInputDataType.Trailing; + } + + /// Initializes a new instance of TrailingInputData. + /// Mapping of column names to special uses. + /// The context metadata of the data source. + /// [Required] Specifies the type of signal to monitor. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + /// The ARM resource ID of the component resource used to preprocess the data. + /// [Required] The time offset between the end of the data window and the monitor's current run time. + /// [Required] The size of the trailing data window. + internal TrailingInputData(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri, string preprocessingComponentId, TimeSpan windowOffset, TimeSpan windowSize) : base(columns, dataContext, inputDataType, jobInputType, uri) + { + PreprocessingComponentId = preprocessingComponentId; + WindowOffset = windowOffset; + WindowSize = windowSize; + InputDataType = inputDataType; + } + + /// The ARM resource ID of the component resource used to preprocess the data. + public string PreprocessingComponentId { get; set; } + /// [Required] The time offset between the end of the data window and the monitor's current run time. + public TimeSpan WindowOffset { get; set; } + /// [Required] The size of the trailing data window. + public TimeSpan WindowSize { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingMode.cs new file mode 100644 index 0000000000000..03cec38eb49a0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Training mode dictates whether to use distributed training or not. + public readonly partial struct TrainingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TrainingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutoValue = "Auto"; + private const string DistributedValue = "Distributed"; + private const string NonDistributedValue = "NonDistributed"; + + /// Auto mode. + public static TrainingMode Auto { get; } = new TrainingMode(AutoValue); + /// Distributed training mode. + public static TrainingMode Distributed { get; } = new TrainingMode(DistributedValue); + /// Non distributed training mode. + public static TrainingMode NonDistributed { get; } = new TrainingMode(NonDistributedValue); + /// Determines if two values are the same. + public static bool operator ==(TrainingMode left, TrainingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TrainingMode left, TrainingMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TrainingMode(string value) => new TrainingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TrainingMode other && Equals(other); + /// + public bool Equals(TrainingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.Serialization.cs new file mode 100644 index 0000000000000..bdbc62477b7c5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class TritonInferencingServer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InferenceConfiguration)) + { + if (InferenceConfiguration != null) + { + writer.WritePropertyName("inferenceConfiguration"u8); + writer.WriteObjectValue(InferenceConfiguration); + } + else + { + writer.WriteNull("inferenceConfiguration"); + } + } + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType.ToString()); + writer.WriteEndObject(); + } + + internal static TritonInferencingServer DeserializeTritonInferencingServer(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional inferenceConfiguration = default; + InferencingServerType serverType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inferenceConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inferenceConfiguration = null; + continue; + } + inferenceConfiguration = OnlineInferenceConfiguration.DeserializeOnlineInferenceConfiguration(property.Value); + continue; + } + if (property.NameEquals("serverType"u8)) + { + serverType = new InferencingServerType(property.Value.GetString()); + continue; + } + } + return new TritonInferencingServer(serverType, inferenceConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.cs new file mode 100644 index 0000000000000..2dd51657d6715 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonInferencingServer.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Triton inferencing server configurations. + public partial class TritonInferencingServer : InferencingServer + { + /// Initializes a new instance of TritonInferencingServer. + public TritonInferencingServer() + { + ServerType = InferencingServerType.Triton; + } + + /// Initializes a new instance of TritonInferencingServer. + /// [Required] Inferencing server type for various targets. + /// Inference configuration for Triton. + internal TritonInferencingServer(InferencingServerType serverType, OnlineInferenceConfiguration inferenceConfiguration) : base(serverType) + { + InferenceConfiguration = inferenceConfiguration; + ServerType = serverType; + } + + /// Inference configuration for Triton. + public OnlineInferenceConfiguration InferenceConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.Serialization.cs new file mode 100644 index 0000000000000..06dbe14610535 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownBaseEnvironmentSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("baseEnvironmentSourceType"u8); + writer.WriteStringValue(BaseEnvironmentSourceType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownBaseEnvironmentSource DeserializeUnknownBaseEnvironmentSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BaseEnvironmentSourceType baseEnvironmentSourceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseEnvironmentSourceType"u8)) + { + baseEnvironmentSourceType = new BaseEnvironmentSourceType(property.Value.GetString()); + continue; + } + } + return new UnknownBaseEnvironmentSource(baseEnvironmentSourceType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.cs new file mode 100644 index 0000000000000..81616e32c15b2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBaseEnvironmentSource.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownBaseEnvironmentSource. + internal partial class UnknownBaseEnvironmentSource : BaseEnvironmentSource + { + /// Initializes a new instance of UnknownBaseEnvironmentSource. + /// [Required] Base environment type. + internal UnknownBaseEnvironmentSource(BaseEnvironmentSourceType baseEnvironmentSourceType) : base(baseEnvironmentSourceType) + { + BaseEnvironmentSourceType = baseEnvironmentSourceType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.Serialization.cs new file mode 100644 index 0000000000000..59e485f8aab0a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownBatchDeploymentConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("deploymentConfigurationType"u8); + writer.WriteStringValue(DeploymentConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownBatchDeploymentConfiguration DeserializeUnknownBatchDeploymentConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchDeploymentConfigurationType deploymentConfigurationType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentConfigurationType"u8)) + { + deploymentConfigurationType = new BatchDeploymentConfigurationType(property.Value.GetString()); + continue; + } + } + return new UnknownBatchDeploymentConfiguration(deploymentConfigurationType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.cs new file mode 100644 index 0000000000000..5915563e1eb44 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownBatchDeploymentConfiguration.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownBatchDeploymentConfiguration. + internal partial class UnknownBatchDeploymentConfiguration : BatchDeploymentConfiguration + { + /// Initializes a new instance of UnknownBatchDeploymentConfiguration. + /// [Required] The type of the deployment. + internal UnknownBatchDeploymentConfiguration(BatchDeploymentConfigurationType deploymentConfigurationType) : base(deploymentConfigurationType) + { + DeploymentConfigurationType = deploymentConfigurationType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..feb422ab252e2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownDataDriftMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static UnknownDataDriftMetricThresholdBase DeserializeUnknownDataDriftMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringFeatureDataType dataType = "Unknown"; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new UnknownDataDriftMetricThresholdBase(dataType, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.cs new file mode 100644 index 0000000000000..9ac0683dfa47c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataDriftMetricThresholdBase.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownDataDriftMetricThresholdBase. + internal partial class UnknownDataDriftMetricThresholdBase : DataDriftMetricThresholdBase + { + /// Initializes a new instance of UnknownDataDriftMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal UnknownDataDriftMetricThresholdBase(MonitoringFeatureDataType dataType, MonitoringThreshold threshold) : base(dataType, threshold) + { + DataType = dataType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.Serialization.cs new file mode 100644 index 0000000000000..4b6e97b3d9c99 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownDataImportSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Connection)) + { + if (Connection != null) + { + writer.WritePropertyName("connection"u8); + writer.WriteStringValue(Connection); + } + else + { + writer.WriteNull("connection"); + } + } + writer.WritePropertyName("sourceType"u8); + writer.WriteStringValue(SourceType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownDataImportSource DeserializeUnknownDataImportSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional connection = default; + DataImportSourceType sourceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + connection = null; + continue; + } + connection = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceType"u8)) + { + sourceType = new DataImportSourceType(property.Value.GetString()); + continue; + } + } + return new UnknownDataImportSource(connection.Value, sourceType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.cs new file mode 100644 index 0000000000000..ebe5df37ed47e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataImportSource.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownDataImportSource. + internal partial class UnknownDataImportSource : DataImportSource + { + /// Initializes a new instance of UnknownDataImportSource. + /// Workspace connection for data import source storage. + /// [Required] Specifies the type of data. + internal UnknownDataImportSource(string connection, DataImportSourceType sourceType) : base(connection, sourceType) + { + SourceType = sourceType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..f9ea9d6cf6446 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownDataQualityMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static UnknownDataQualityMetricThresholdBase DeserializeUnknownDataQualityMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringFeatureDataType dataType = "Unknown"; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new UnknownDataQualityMetricThresholdBase(dataType, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.cs new file mode 100644 index 0000000000000..f1453c7ec3178 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataQualityMetricThresholdBase.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownDataQualityMetricThresholdBase. + internal partial class UnknownDataQualityMetricThresholdBase : DataQualityMetricThresholdBase + { + /// Initializes a new instance of UnknownDataQualityMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal UnknownDataQualityMetricThresholdBase(MonitoringFeatureDataType dataType, MonitoringThreshold threshold) : base(dataType, threshold) + { + DataType = dataType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.Serialization.cs new file mode 100644 index 0000000000000..ccfc6f6deb677 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.Serialization.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownExportSummary : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownExportSummary DeserializeUnknownExportSummary(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional endDateTime = default; + Optional exportedRowCount = default; + ExportFormatType format = "Unknown"; + Optional labelingJobId = default; + Optional startDateTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endDateTime = null; + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exportedRowCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + exportedRowCount = null; + continue; + } + exportedRowCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("format"u8)) + { + format = new ExportFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("labelingJobId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + labelingJobId = null; + continue; + } + labelingJobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + startDateTime = null; + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new UnknownExportSummary(Optional.ToNullable(endDateTime), Optional.ToNullable(exportedRowCount), format, labelingJobId.Value, Optional.ToNullable(startDateTime)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.cs new file mode 100644 index 0000000000000..4ede6d8eb23c9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownExportSummary.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownExportSummary. + internal partial class UnknownExportSummary : ExportSummary + { + /// Initializes a new instance of UnknownExportSummary. + /// The time when the export was completed. + /// The total number of labeled datapoints exported. + /// [Required] The format of exported labels, also as the discriminator. + /// Name and identifier of the job containing exported labels. + /// The time when the export was requested. + internal UnknownExportSummary(DateTimeOffset? endOn, long? exportedRowCount, ExportFormatType format, string labelingJobId, DateTimeOffset? startOn) : base(endOn, exportedRowCount, format, labelingJobId, startOn) + { + Format = format; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.Serialization.cs new file mode 100644 index 0000000000000..1112c0432920c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownInferencingServer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownInferencingServer DeserializeUnknownInferencingServer(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InferencingServerType serverType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serverType"u8)) + { + serverType = new InferencingServerType(property.Value.GetString()); + continue; + } + } + return new UnknownInferencingServer(serverType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.cs new file mode 100644 index 0000000000000..af8d48b138c2c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownInferencingServer.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownInferencingServer. + internal partial class UnknownInferencingServer : InferencingServer + { + /// Initializes a new instance of UnknownInferencingServer. + /// [Required] Inferencing server type for various targets. + internal UnknownInferencingServer(InferencingServerType serverType) : base(serverType) + { + ServerType = serverType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.Serialization.cs new file mode 100644 index 0000000000000..f8d9d9d4db005 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownLabelingJobMediaProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mediaType"u8); + writer.WriteStringValue(MediaType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownLabelingJobMediaProperties DeserializeUnknownLabelingJobMediaProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MediaType mediaType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mediaType"u8)) + { + mediaType = new MediaType(property.Value.GetString()); + continue; + } + } + return new UnknownLabelingJobMediaProperties(mediaType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.cs new file mode 100644 index 0000000000000..4f80ddcd8317a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownLabelingJobMediaProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownLabelingJobMediaProperties. + internal partial class UnknownLabelingJobMediaProperties : LabelingJobMediaProperties + { + /// Initializes a new instance of UnknownLabelingJobMediaProperties. + /// [Required] Media type of the job. + internal UnknownLabelingJobMediaProperties(MediaType mediaType) : base(mediaType) + { + MediaType = mediaType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.Serialization.cs new file mode 100644 index 0000000000000..8ecedb29f92d5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownMLAssistConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mlAssist"u8); + writer.WriteStringValue(MlAssist.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownMLAssistConfiguration DeserializeUnknownMLAssistConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MLAssistConfigurationType mlAssist = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mlAssist"u8)) + { + mlAssist = new MLAssistConfigurationType(property.Value.GetString()); + continue; + } + } + return new UnknownMLAssistConfiguration(mlAssist); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.cs new file mode 100644 index 0000000000000..c27b6c93dc652 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMLAssistConfiguration.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownMLAssistConfiguration. + internal partial class UnknownMLAssistConfiguration : MachineLearningAssistConfiguration + { + /// Initializes a new instance of UnknownMLAssistConfiguration. + /// [Required] Indicates whether MLAssist feature is enabled. + internal UnknownMLAssistConfiguration(MLAssistConfigurationType mlAssist) : base(mlAssist) + { + MlAssist = mlAssist; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..0bc797e05cfd1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownModelPerformanceMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("modelType"u8); + writer.WriteStringValue(ModelType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static UnknownModelPerformanceMetricThresholdBase DeserializeUnknownModelPerformanceMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringModelType modelType = "Unknown"; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelType"u8)) + { + modelType = new MonitoringModelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new UnknownModelPerformanceMetricThresholdBase(modelType, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.cs new file mode 100644 index 0000000000000..4b57000c62304 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownModelPerformanceMetricThresholdBase.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownModelPerformanceMetricThresholdBase. + internal partial class UnknownModelPerformanceMetricThresholdBase : ModelPerformanceMetricThresholdBase + { + /// Initializes a new instance of UnknownModelPerformanceMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal UnknownModelPerformanceMetricThresholdBase(MonitoringModelType modelType, MonitoringThreshold threshold) : base(modelType, threshold) + { + ModelType = modelType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.Serialization.cs new file mode 100644 index 0000000000000..94e23f132686f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownMonitorComputeConfigurationBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeType"u8); + writer.WriteStringValue(ComputeType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownMonitorComputeConfigurationBase DeserializeUnknownMonitorComputeConfigurationBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitorComputeType computeType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeType"u8)) + { + computeType = new MonitorComputeType(property.Value.GetString()); + continue; + } + } + return new UnknownMonitorComputeConfigurationBase(computeType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.cs new file mode 100644 index 0000000000000..fec1ef31fef42 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeConfigurationBase.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownMonitorComputeConfigurationBase. + internal partial class UnknownMonitorComputeConfigurationBase : MonitorComputeConfigurationBase + { + /// Initializes a new instance of UnknownMonitorComputeConfigurationBase. + /// [Required] Specifies the type of signal to monitor. + internal UnknownMonitorComputeConfigurationBase(MonitorComputeType computeType) : base(computeType) + { + ComputeType = computeType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.Serialization.cs new file mode 100644 index 0000000000000..3d6c307e5a421 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownMonitorComputeIdentityBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeIdentityType"u8); + writer.WriteStringValue(ComputeIdentityType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownMonitorComputeIdentityBase DeserializeUnknownMonitorComputeIdentityBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitorComputeIdentityType computeIdentityType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeIdentityType"u8)) + { + computeIdentityType = new MonitorComputeIdentityType(property.Value.GetString()); + continue; + } + } + return new UnknownMonitorComputeIdentityBase(computeIdentityType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.cs new file mode 100644 index 0000000000000..c7f6c1d9637cb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitorComputeIdentityBase.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownMonitorComputeIdentityBase. + internal partial class UnknownMonitorComputeIdentityBase : MonitorComputeIdentityBase + { + /// Initializes a new instance of UnknownMonitorComputeIdentityBase. + /// [Required] Monitor compute identity type enum. + internal UnknownMonitorComputeIdentityBase(MonitorComputeIdentityType computeIdentityType) : base(computeIdentityType) + { + ComputeIdentityType = computeIdentityType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.Serialization.cs new file mode 100644 index 0000000000000..8e5df00a55276 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownMonitoringAlertNotificationSettingsBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("alertNotificationType"u8); + writer.WriteStringValue(AlertNotificationType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownMonitoringAlertNotificationSettingsBase DeserializeUnknownMonitoringAlertNotificationSettingsBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringAlertNotificationType alertNotificationType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alertNotificationType"u8)) + { + alertNotificationType = new MonitoringAlertNotificationType(property.Value.GetString()); + continue; + } + } + return new UnknownMonitoringAlertNotificationSettingsBase(alertNotificationType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.cs new file mode 100644 index 0000000000000..723dc7f20a475 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringAlertNotificationSettingsBase.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownMonitoringAlertNotificationSettingsBase. + internal partial class UnknownMonitoringAlertNotificationSettingsBase : MonitoringAlertNotificationSettingsBase + { + /// Initializes a new instance of UnknownMonitoringAlertNotificationSettingsBase. + /// [Required] Specifies the type of signal to monitor. + internal UnknownMonitoringAlertNotificationSettingsBase(MonitoringAlertNotificationType alertNotificationType) : base(alertNotificationType) + { + AlertNotificationType = alertNotificationType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.Serialization.cs new file mode 100644 index 0000000000000..2429ba8fec508 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownMonitoringFeatureFilterBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("filterType"u8); + writer.WriteStringValue(FilterType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownMonitoringFeatureFilterBase DeserializeUnknownMonitoringFeatureFilterBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringFeatureFilterType filterType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filterType"u8)) + { + filterType = new MonitoringFeatureFilterType(property.Value.GetString()); + continue; + } + } + return new UnknownMonitoringFeatureFilterBase(filterType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.cs new file mode 100644 index 0000000000000..4e2981a5c68e5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringFeatureFilterBase.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownMonitoringFeatureFilterBase. + internal partial class UnknownMonitoringFeatureFilterBase : MonitoringFeatureFilterBase + { + /// Initializes a new instance of UnknownMonitoringFeatureFilterBase. + /// [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + internal UnknownMonitoringFeatureFilterBase(MonitoringFeatureFilterType filterType) : base(filterType) + { + FilterType = filterType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs new file mode 100644 index 0000000000000..082890bf49e2b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownMonitoringInputDataBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Columns)) + { + if (Columns != null) + { + writer.WritePropertyName("columns"u8); + writer.WriteStartObject(); + foreach (var item in Columns) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("columns"); + } + } + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + writer.WriteEndObject(); + } + + internal static UnknownMonitoringInputDataBase DeserializeUnknownMonitoringInputDataBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> columns = default; + Optional dataContext = default; + MonitoringInputDataType inputDataType = "Unknown"; + JobInputType jobInputType = default; + Uri uri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } + if (property.NameEquals("dataContext"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataContext = null; + continue; + } + dataContext = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputDataType"u8)) + { + inputDataType = new MonitoringInputDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobInputType"u8)) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } + } + return new UnknownMonitoringInputDataBase(Optional.ToDictionary(columns), dataContext.Value, inputDataType, jobInputType, uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs new file mode 100644 index 0000000000000..5a5d48bd6d722 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownMonitoringInputDataBase. + internal partial class UnknownMonitoringInputDataBase : MonitoringInputDataBase + { + /// Initializes a new instance of UnknownMonitoringInputDataBase. + /// Mapping of column names to special uses. + /// The context metadata of the data source. + /// [Required] Specifies the type of signal to monitor. + /// [Required] Specifies the type of job. + /// [Required] Input Asset URI. + internal UnknownMonitoringInputDataBase(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri) : base(columns, dataContext, inputDataType, jobInputType, uri) + { + InputDataType = inputDataType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs new file mode 100644 index 0000000000000..7f1b23aa6c846 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownMonitoringSignalBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownMonitoringSignalBase DeserializeUnknownMonitoringSignalBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional mode = default; + Optional> properties = default; + MonitoringSignalType signalType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MonitoringNotificationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } + } + return new UnknownMonitoringSignalBase(Optional.ToNullable(mode), Optional.ToDictionary(properties), signalType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs new file mode 100644 index 0000000000000..637c4194f7449 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownMonitoringSignalBase. + internal partial class UnknownMonitoringSignalBase : MonitoringSignalBase + { + /// Initializes a new instance of UnknownMonitoringSignalBase. + /// The current notification mode for this signal. + /// Property dictionary. Properties can be added, but not removed or altered. + /// [Required] Specifies the type of signal to monitor. + internal UnknownMonitoringSignalBase(MonitoringNotificationMode? mode, IDictionary properties, MonitoringSignalType signalType) : base(mode, properties, signalType) + { + SignalType = signalType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.Serialization.cs new file mode 100644 index 0000000000000..7910889bf2b5a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownNodes : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("nodesValueType"u8); + writer.WriteStringValue(NodesValueType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownNodes DeserializeUnknownNodes(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NodesValueType nodesValueType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodesValueType"u8)) + { + nodesValueType = new NodesValueType(property.Value.GetString()); + continue; + } + } + return new UnknownNodes(nodesValueType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.cs new file mode 100644 index 0000000000000..dfe6d0ede2fc6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNodes.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownNodes. + internal partial class UnknownNodes : JobNodes + { + /// Initializes a new instance of UnknownNodes. + /// [Required] Type of the Nodes value. + internal UnknownNodes(NodesValueType nodesValueType) : base(nodesValueType) + { + NodesValueType = nodesValueType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs new file mode 100644 index 0000000000000..8ca031a52b4d8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownOneLakeArtifact : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("artifactName"u8); + writer.WriteStringValue(ArtifactName); + writer.WritePropertyName("artifactType"u8); + writer.WriteStringValue(ArtifactType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownOneLakeArtifact DeserializeUnknownOneLakeArtifact(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string artifactName = default; + OneLakeArtifactType artifactType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("artifactName"u8)) + { + artifactName = property.Value.GetString(); + continue; + } + if (property.NameEquals("artifactType"u8)) + { + artifactType = new OneLakeArtifactType(property.Value.GetString()); + continue; + } + } + return new UnknownOneLakeArtifact(artifactName, artifactType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs new file mode 100644 index 0000000000000..7faf9bd9e2e3e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownOneLakeArtifact. + internal partial class UnknownOneLakeArtifact : OneLakeArtifact + { + /// Initializes a new instance of UnknownOneLakeArtifact. + /// [Required] OneLake artifact name. + /// [Required] OneLake artifact type. + internal UnknownOneLakeArtifact(string artifactName, OneLakeArtifactType artifactType) : base(artifactName, artifactType) + { + ArtifactType = artifactType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs new file mode 100644 index 0000000000000..499dfe757674f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownOutboundRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(OutboundRuleType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownOutboundRule DeserializeUnknownOutboundRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional category = default; + Optional status = default; + OutboundRuleType type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new OutboundRuleCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new OutboundRuleStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new OutboundRuleType(property.Value.GetString()); + continue; + } + } + return new UnknownOutboundRule(Optional.ToNullable(category), Optional.ToNullable(status), type); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs new file mode 100644 index 0000000000000..07bc7f338f889 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownOutboundRule. + internal partial class UnknownOutboundRule : MachineLearningOutboundRule + { + /// Initializes a new instance of UnknownOutboundRule. + /// Category of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + /// Type of a managed network Outbound Rule of a machine learning workspace. + internal UnknownOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType) : base(category, status, outboundRuleType) + { + OutboundRuleType = outboundRuleType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.Serialization.cs new file mode 100644 index 0000000000000..6cca9481c2129 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownPackageInputPathBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("inputPathType"u8); + writer.WriteStringValue(InputPathType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownPackageInputPathBase DeserializeUnknownPackageInputPathBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InputPathType inputPathType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputPathType"u8)) + { + inputPathType = new InputPathType(property.Value.GetString()); + continue; + } + } + return new UnknownPackageInputPathBase(inputPathType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.cs new file mode 100644 index 0000000000000..318e15b66da30 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPackageInputPathBase.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownPackageInputPathBase. + internal partial class UnknownPackageInputPathBase : PackageInputPathBase + { + /// Initializes a new instance of UnknownPackageInputPathBase. + /// [Required] Input path type for package inputs. + internal UnknownPackageInputPathBase(InputPathType inputPathType) : base(inputPathType) + { + InputPathType = inputPathType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.Serialization.cs new file mode 100644 index 0000000000000..49b70c1c49b98 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownPendingUploadCredentialDto + { + internal static UnknownPendingUploadCredentialDto DeserializeUnknownPendingUploadCredentialDto(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PendingUploadCredentialType credentialType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentialType"u8)) + { + credentialType = new PendingUploadCredentialType(property.Value.GetString()); + continue; + } + } + return new UnknownPendingUploadCredentialDto(credentialType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.cs new file mode 100644 index 0000000000000..98cec29c94c17 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPendingUploadCredentialDto.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownPendingUploadCredentialDto. + internal partial class UnknownPendingUploadCredentialDto : PendingUploadCredentialDto + { + /// Initializes a new instance of UnknownPendingUploadCredentialDto. + /// [Required] Credential type used to authentication with storage. + internal UnknownPendingUploadCredentialDto(PendingUploadCredentialType credentialType) : base(credentialType) + { + CredentialType = credentialType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.Serialization.cs new file mode 100644 index 0000000000000..fca22b926e23b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownPredictionDriftMetricThresholdBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(Threshold)) + { + if (Threshold != null) + { + writer.WritePropertyName("threshold"u8); + writer.WriteObjectValue(Threshold); + } + else + { + writer.WriteNull("threshold"); + } + } + writer.WriteEndObject(); + } + + internal static UnknownPredictionDriftMetricThresholdBase DeserializeUnknownPredictionDriftMetricThresholdBase(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoringFeatureDataType dataType = "Unknown"; + Optional threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType"u8)) + { + dataType = new MonitoringFeatureDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + threshold = null; + continue; + } + threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value); + continue; + } + } + return new UnknownPredictionDriftMetricThresholdBase(dataType, threshold.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.cs new file mode 100644 index 0000000000000..83f37c391625d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownPredictionDriftMetricThresholdBase.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownPredictionDriftMetricThresholdBase. + internal partial class UnknownPredictionDriftMetricThresholdBase : PredictionDriftMetricThresholdBase + { + /// Initializes a new instance of UnknownPredictionDriftMetricThresholdBase. + /// [Required] Specifies the data type of the metric threshold. + /// The threshold value. If null, a default value will be set depending on the selected metric. + internal UnknownPredictionDriftMetricThresholdBase(MonitoringFeatureDataType dataType, MonitoringThreshold threshold) : base(dataType, threshold) + { + DataType = dataType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.Serialization.cs new file mode 100644 index 0000000000000..4c5c7e7425c8c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownSparkJobEntry : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("sparkJobEntryType"u8); + writer.WriteStringValue(SparkJobEntryType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownSparkJobEntry DeserializeUnknownSparkJobEntry(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SparkJobEntryType sparkJobEntryType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sparkJobEntryType"u8)) + { + sparkJobEntryType = new SparkJobEntryType(property.Value.GetString()); + continue; + } + } + return new UnknownSparkJobEntry(sparkJobEntryType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.cs new file mode 100644 index 0000000000000..81ddac11c5039 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSparkJobEntry.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownSparkJobEntry. + internal partial class UnknownSparkJobEntry : SparkJobEntry + { + /// Initializes a new instance of UnknownSparkJobEntry. + /// [Required] Type of the job's entry point. + internal UnknownSparkJobEntry(SparkJobEntryType sparkJobEntryType) : base(sparkJobEntryType) + { + SparkJobEntryType = sparkJobEntryType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs new file mode 100644 index 0000000000000..f57934802f04e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UnknownWebhook : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventType)) + { + if (EventType != null) + { + writer.WritePropertyName("eventType"u8); + writer.WriteStringValue(EventType); + } + else + { + writer.WriteNull("eventType"); + } + } + writer.WritePropertyName("webhookType"u8); + writer.WriteStringValue(WebhookType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownWebhook DeserializeUnknownWebhook(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional eventType = default; + MachineLearningWebhookType webhookType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + eventType = null; + continue; + } + eventType = property.Value.GetString(); + continue; + } + if (property.NameEquals("webhookType"u8)) + { + webhookType = new MachineLearningWebhookType(property.Value.GetString()); + continue; + } + } + return new UnknownWebhook(eventType.Value, webhookType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs new file mode 100644 index 0000000000000..8df46ede7e523 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UnknownWebhook. + internal partial class UnknownWebhook : MachineLearningWebhook + { + /// Initializes a new instance of UnknownWebhook. + /// Send callback on a specified notification event. + /// [Required] Specifies the type of service to send a callback. + internal UnknownWebhook(string eventType, MachineLearningWebhookType webhookType) : base(eventType, webhookType) + { + WebhookType = webhookType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs index 20e8fde28eedd..44f4b0e63e59c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Text.Json; using Azure.Core; @@ -22,20 +23,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(ExpiryOn)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); } - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(Metadata)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Metadata.ToString()).RootElement); +#endif } - if (Optional.IsDefined(ValueFormat)) + if (Optional.IsDefined(Target)) { - writer.WritePropertyName("valueFormat"u8); - writer.WriteStringValue(ValueFormat.Value.ToString()); + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); } writer.WriteEndObject(); } @@ -48,9 +53,9 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa } MachineLearningConnectionAuthType authType = "Unknown"; Optional category = default; + Optional expiryTime = default; + Optional metadata = default; Optional target = default; - Optional value = default; - Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("authType"u8)) @@ -67,27 +72,31 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa category = new MachineLearningConnectionCategory(property.Value.GetString()); continue; } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value"u8)) + if (property.NameEquals("expiryTime"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("valueFormat"u8)) + if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); continue; } } - return new UnknownWorkspaceConnectionPropertiesV2(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat)); + return new UnknownWorkspaceConnectionPropertiesV2(authType, Optional.ToNullable(category), Optional.ToNullable(expiryTime), metadata.Value, target.Value); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs index d9ba88976ccd1..9335f7267d88b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs @@ -5,6 +5,8 @@ #nullable disable +using System; + namespace Azure.ResourceManager.MachineLearning.Models { /// The UnknownWorkspaceConnectionPropertiesV2. @@ -13,10 +15,10 @@ internal partial class UnknownWorkspaceConnectionPropertiesV2 : MachineLearningW /// Initializes a new instance of UnknownWorkspaceConnectionPropertiesV2. /// Authentication type of the connection target. /// Category of the connection. + /// + /// Any object. /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - internal UnknownWorkspaceConnectionPropertiesV2(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat) : base(authType, category, target, value, valueFormat) + internal UnknownWorkspaceConnectionPropertiesV2(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, DateTimeOffset? expiryOn, BinaryData metadata, string target) : base(authType, category, expiryOn, metadata, target) { AuthType = authType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.Serialization.cs new file mode 100644 index 0000000000000..8ebd7398b9f90 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UserCreatedAcrAccount : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ArmResourceIdentifier)) + { + if (ArmResourceIdentifier != null) + { + writer.WritePropertyName("armResourceId"u8); + writer.WriteObjectValue(ArmResourceIdentifier); + } + else + { + writer.WriteNull("armResourceId"); + } + } + writer.WriteEndObject(); + } + + internal static UserCreatedAcrAccount DeserializeUserCreatedAcrAccount(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional armResourceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("armResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + armResourceId = null; + continue; + } + armResourceId = Models.ArmResourceId.DeserializeArmResourceId(property.Value); + continue; + } + } + return new UserCreatedAcrAccount(armResourceId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.cs new file mode 100644 index 0000000000000..c9dbc5a145317 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedAcrAccount.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UserCreatedAcrAccount. + internal partial class UserCreatedAcrAccount + { + /// Initializes a new instance of UserCreatedAcrAccount. + public UserCreatedAcrAccount() + { + } + + /// Initializes a new instance of UserCreatedAcrAccount. + /// ARM ResourceId of a resource. + internal UserCreatedAcrAccount(ArmResourceId armResourceIdentifier) + { + ArmResourceIdentifier = armResourceIdentifier; + } + + /// ARM ResourceId of a resource. + internal ArmResourceId ArmResourceIdentifier { get; set; } + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ArmResourceId + { + get => ArmResourceIdentifier is null ? default : ArmResourceIdentifier.ResourceId; + set + { + if (ArmResourceIdentifier is null) + ArmResourceIdentifier = new ArmResourceId(); + ArmResourceIdentifier.ResourceId = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.Serialization.cs new file mode 100644 index 0000000000000..6999ab1cfaead --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class UserCreatedStorageAccount : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ArmResourceIdentifier)) + { + if (ArmResourceIdentifier != null) + { + writer.WritePropertyName("armResourceId"u8); + writer.WriteObjectValue(ArmResourceIdentifier); + } + else + { + writer.WriteNull("armResourceId"); + } + } + writer.WriteEndObject(); + } + + internal static UserCreatedStorageAccount DeserializeUserCreatedStorageAccount(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional armResourceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("armResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + armResourceId = null; + continue; + } + armResourceId = Models.ArmResourceId.DeserializeArmResourceId(property.Value); + continue; + } + } + return new UserCreatedStorageAccount(armResourceId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.cs new file mode 100644 index 0000000000000..ffb0cb7be9f20 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserCreatedStorageAccount.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The UserCreatedStorageAccount. + internal partial class UserCreatedStorageAccount + { + /// Initializes a new instance of UserCreatedStorageAccount. + public UserCreatedStorageAccount() + { + } + + /// Initializes a new instance of UserCreatedStorageAccount. + /// ARM ResourceId of a resource. + internal UserCreatedStorageAccount(ArmResourceId armResourceIdentifier) + { + ArmResourceIdentifier = armResourceIdentifier; + } + + /// ARM ResourceId of a resource. + internal ArmResourceId ArmResourceIdentifier { get; set; } + /// + /// Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + /// or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + /// + public ResourceIdentifier ArmResourceId + { + get => ArmResourceIdentifier is null ? default : ArmResourceIdentifier.ResourceId; + set + { + if (ArmResourceIdentifier is null) + ArmResourceIdentifier = new ArmResourceId(); + ArmResourceIdentifier.ResourceId = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs new file mode 100644 index 0000000000000..fba5626f0872e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class VolumeDefinition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DefinitionType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(DefinitionType.Value.ToString()); + } + if (Optional.IsDefined(ReadOnly)) + { + if (ReadOnly != null) + { + writer.WritePropertyName("readOnly"u8); + writer.WriteBooleanValue(ReadOnly.Value); + } + else + { + writer.WriteNull("readOnly"); + } + } + if (Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Consistency)) + { + if (Consistency != null) + { + writer.WritePropertyName("consistency"u8); + writer.WriteStringValue(Consistency); + } + else + { + writer.WriteNull("consistency"); + } + } + if (Optional.IsDefined(Bind)) + { + if (Bind != null) + { + writer.WritePropertyName("bind"u8); + writer.WriteObjectValue(Bind); + } + else + { + writer.WriteNull("bind"); + } + } + if (Optional.IsDefined(Volume)) + { + if (Volume != null) + { + writer.WritePropertyName("volume"u8); + writer.WriteObjectValue(Volume); + } + else + { + writer.WriteNull("volume"); + } + } + if (Optional.IsDefined(Tmpfs)) + { + if (Tmpfs != null) + { + writer.WritePropertyName("tmpfs"u8); + writer.WriteObjectValue(Tmpfs); + } + else + { + writer.WriteNull("tmpfs"); + } + } + writer.WriteEndObject(); + } + + internal static VolumeDefinition DeserializeVolumeDefinition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional readOnly = default; + Optional source = default; + Optional target = default; + Optional consistency = default; + Optional bind = default; + Optional volume = default; + Optional tmpfs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new VolumeDefinitionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("readOnly"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + readOnly = null; + continue; + } + readOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("consistency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + consistency = null; + continue; + } + consistency = property.Value.GetString(); + continue; + } + if (property.NameEquals("bind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + bind = null; + continue; + } + bind = MountBindOptions.DeserializeMountBindOptions(property.Value); + continue; + } + if (property.NameEquals("volume"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + volume = null; + continue; + } + volume = VolumeOptions.DeserializeVolumeOptions(property.Value); + continue; + } + if (property.NameEquals("tmpfs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tmpfs = null; + continue; + } + tmpfs = TmpfsOptions.DeserializeTmpfsOptions(property.Value); + continue; + } + } + return new VolumeDefinition(Optional.ToNullable(type), Optional.ToNullable(readOnly), source.Value, target.Value, consistency.Value, bind.Value, volume.Value, tmpfs.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs new file mode 100644 index 0000000000000..545868c9f3721 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The VolumeDefinition. + public partial class VolumeDefinition + { + /// Initializes a new instance of VolumeDefinition. + public VolumeDefinition() + { + } + + /// Initializes a new instance of VolumeDefinition. + /// Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + /// Indicate whether to mount volume as readOnly. Default value for this is false. + /// Source of the mount. For bind mounts this is the host path. + /// Target of the mount. For bind mounts this is the path in the container. + /// Consistency of the volume. + /// Bind Options of the mount. + /// Volume Options of the mount. + /// tmpfs option of the mount. + internal VolumeDefinition(VolumeDefinitionType? definitionType, bool? readOnly, string source, string target, string consistency, MountBindOptions bind, VolumeOptions volume, TmpfsOptions tmpfs) + { + DefinitionType = definitionType; + ReadOnly = readOnly; + Source = source; + Target = target; + Consistency = consistency; + Bind = bind; + Volume = volume; + Tmpfs = tmpfs; + } + + /// Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + public VolumeDefinitionType? DefinitionType { get; set; } + /// Indicate whether to mount volume as readOnly. Default value for this is false. + public bool? ReadOnly { get; set; } + /// Source of the mount. For bind mounts this is the host path. + public string Source { get; set; } + /// Target of the mount. For bind mounts this is the path in the container. + public string Target { get; set; } + /// Consistency of the volume. + public string Consistency { get; set; } + /// Bind Options of the mount. + public MountBindOptions Bind { get; set; } + /// Volume Options of the mount. + internal VolumeOptions Volume { get; set; } + /// Indicate whether volume is nocopy. + public bool? Nocopy + { + get => Volume is null ? default : Volume.Nocopy; + set + { + if (Volume is null) + Volume = new VolumeOptions(); + Volume.Nocopy = value; + } + } + + /// tmpfs option of the mount. + internal TmpfsOptions Tmpfs { get; set; } + /// Mention the Tmpfs size. + public int? TmpfsSize + { + get => Tmpfs is null ? default : Tmpfs.Size; + set + { + if (Tmpfs is null) + Tmpfs = new TmpfsOptions(); + Tmpfs.Size = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinitionType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinitionType.cs new file mode 100644 index 0000000000000..433f9193f758b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinitionType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + public readonly partial struct VolumeDefinitionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VolumeDefinitionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BindValue = "bind"; + private const string VolumeValue = "volume"; + private const string TmpfsValue = "tmpfs"; + private const string NpipeValue = "npipe"; + + /// bind. + public static VolumeDefinitionType Bind { get; } = new VolumeDefinitionType(BindValue); + /// volume. + public static VolumeDefinitionType Volume { get; } = new VolumeDefinitionType(VolumeValue); + /// tmpfs. + public static VolumeDefinitionType Tmpfs { get; } = new VolumeDefinitionType(TmpfsValue); + /// npipe. + public static VolumeDefinitionType Npipe { get; } = new VolumeDefinitionType(NpipeValue); + /// Determines if two values are the same. + public static bool operator ==(VolumeDefinitionType left, VolumeDefinitionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VolumeDefinitionType left, VolumeDefinitionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VolumeDefinitionType(string value) => new VolumeDefinitionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VolumeDefinitionType other && Equals(other); + /// + public bool Equals(VolumeDefinitionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.Serialization.cs new file mode 100644 index 0000000000000..124a682a2ec4d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class VolumeOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Nocopy)) + { + if (Nocopy != null) + { + writer.WritePropertyName("nocopy"u8); + writer.WriteBooleanValue(Nocopy.Value); + } + else + { + writer.WriteNull("nocopy"); + } + } + writer.WriteEndObject(); + } + + internal static VolumeOptions DeserializeVolumeOptions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nocopy = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nocopy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nocopy = null; + continue; + } + nocopy = property.Value.GetBoolean(); + continue; + } + } + return new VolumeOptions(Optional.ToNullable(nocopy)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs new file mode 100644 index 0000000000000..d36990e2c9e60 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The VolumeOptions. + internal partial class VolumeOptions + { + /// Initializes a new instance of VolumeOptions. + public VolumeOptions() + { + } + + /// Initializes a new instance of VolumeOptions. + /// Indicate whether volume is nocopy. + internal VolumeOptions(bool? nocopy) + { + Nocopy = nocopy; + } + + /// Indicate whether volume is nocopy. + public bool? Nocopy { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.Serialization.cs new file mode 100644 index 0000000000000..5645ba2931073 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class WorkspaceConnectionAccessKey : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AccessKeyId)) + { + writer.WritePropertyName("accessKeyId"u8); + writer.WriteStringValue(AccessKeyId); + } + if (Optional.IsDefined(SecretAccessKey)) + { + writer.WritePropertyName("secretAccessKey"u8); + writer.WriteStringValue(SecretAccessKey); + } + writer.WriteEndObject(); + } + + internal static WorkspaceConnectionAccessKey DeserializeWorkspaceConnectionAccessKey(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional accessKeyId = default; + Optional secretAccessKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accessKeyId"u8)) + { + accessKeyId = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretAccessKey"u8)) + { + secretAccessKey = property.Value.GetString(); + continue; + } + } + return new WorkspaceConnectionAccessKey(accessKeyId.Value, secretAccessKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.cs new file mode 100644 index 0000000000000..634d099b847af --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccessKey.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The WorkspaceConnectionAccessKey. + public partial class WorkspaceConnectionAccessKey + { + /// Initializes a new instance of WorkspaceConnectionAccessKey. + public WorkspaceConnectionAccessKey() + { + } + + /// Initializes a new instance of WorkspaceConnectionAccessKey. + /// + /// + internal WorkspaceConnectionAccessKey(string accessKeyId, string secretAccessKey) + { + AccessKeyId = accessKeyId; + SecretAccessKey = secretAccessKey; + } + + /// Gets or sets the access key id. + public string AccessKeyId { get; set; } + /// Gets or sets the secret access key. + public string SecretAccessKey { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.Serialization.cs new file mode 100644 index 0000000000000..f0c733b60ffa9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class WorkspaceConnectionApiKey : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Key)) + { + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + } + writer.WriteEndObject(); + } + + internal static WorkspaceConnectionApiKey DeserializeWorkspaceConnectionApiKey(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional key = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + } + return new WorkspaceConnectionApiKey(key.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.cs new file mode 100644 index 0000000000000..40012493b7588 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionApiKey.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Api key object for workspace connection credential. + internal partial class WorkspaceConnectionApiKey + { + /// Initializes a new instance of WorkspaceConnectionApiKey. + public WorkspaceConnectionApiKey() + { + } + + /// Initializes a new instance of WorkspaceConnectionApiKey. + /// + internal WorkspaceConnectionApiKey(string key) + { + Key = key; + } + + /// Gets or sets the key. + public string Key { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs index ac06a6a217833..402ff0a95fa36 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs @@ -20,10 +20,15 @@ internal static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult D { return null; } - Optional> value = default; Optional nextLink = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -38,13 +43,8 @@ internal static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult D value = array; continue; } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } } - return new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + return new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(nextLink.Value, Optional.ToList(value)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs index 730d740289063..0a4aea5e0cde1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs @@ -21,17 +21,17 @@ internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() } /// Initializes a new instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. - /// /// - internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + /// + internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { - Value = value; NextLink = nextLink; + Value = value; } - /// Gets the value. - public IReadOnlyList Value { get; } /// Gets the next link. public string NextLink { get; } + /// Gets the value. + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.Serialization.cs new file mode 100644 index 0000000000000..f270013535a37 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class WorkspaceConnectionServicePrincipal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + if (Optional.IsDefined(ClientSecret)) + { + writer.WritePropertyName("clientSecret"u8); + writer.WriteStringValue(ClientSecret); + } + if (Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + writer.WriteEndObject(); + } + + internal static WorkspaceConnectionServicePrincipal DeserializeWorkspaceConnectionServicePrincipal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional clientId = default; + Optional clientSecret = default; + Optional tenantId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientSecret"u8)) + { + clientSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property.Value.GetGuid(); + continue; + } + } + return new WorkspaceConnectionServicePrincipal(clientId.Value, clientSecret.Value, Optional.ToNullable(tenantId)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.cs new file mode 100644 index 0000000000000..3ca4403a10d0a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionServicePrincipal.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// The WorkspaceConnectionServicePrincipal. + public partial class WorkspaceConnectionServicePrincipal + { + /// Initializes a new instance of WorkspaceConnectionServicePrincipal. + public WorkspaceConnectionServicePrincipal() + { + } + + /// Initializes a new instance of WorkspaceConnectionServicePrincipal. + /// + /// + /// + internal WorkspaceConnectionServicePrincipal(string clientId, string clientSecret, Guid? tenantId) + { + ClientId = clientId; + ClientSecret = clientSecret; + TenantId = tenantId; + } + + /// Gets or sets the client id. + public string ClientId { get; set; } + /// Gets or sets the client secret. + public string ClientSecret { get; set; } + /// Gets or sets the tenant id. + public Guid? TenantId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.Serialization.cs new file mode 100644 index 0000000000000..6a8fef027da26 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class WorkspaceHubConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AdditionalWorkspaceStorageAccounts)) + { + writer.WritePropertyName("additionalWorkspaceStorageAccounts"u8); + writer.WriteStartArray(); + foreach (var item in AdditionalWorkspaceStorageAccounts) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DefaultWorkspaceResourceGroup)) + { + writer.WritePropertyName("defaultWorkspaceResourceGroup"u8); + writer.WriteStringValue(DefaultWorkspaceResourceGroup); + } + writer.WriteEndObject(); + } + + internal static WorkspaceHubConfig DeserializeWorkspaceHubConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> additionalWorkspaceStorageAccounts = default; + Optional defaultWorkspaceResourceGroup = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("additionalWorkspaceStorageAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + additionalWorkspaceStorageAccounts = array; + continue; + } + if (property.NameEquals("defaultWorkspaceResourceGroup"u8)) + { + defaultWorkspaceResourceGroup = property.Value.GetString(); + continue; + } + } + return new WorkspaceHubConfig(Optional.ToList(additionalWorkspaceStorageAccounts), defaultWorkspaceResourceGroup.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.cs new file mode 100644 index 0000000000000..6cb55c1780be1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceHubConfig.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// WorkspaceHub's configuration object. + public partial class WorkspaceHubConfig + { + /// Initializes a new instance of WorkspaceHubConfig. + public WorkspaceHubConfig() + { + AdditionalWorkspaceStorageAccounts = new ChangeTrackingList(); + } + + /// Initializes a new instance of WorkspaceHubConfig. + /// + /// + internal WorkspaceHubConfig(IList additionalWorkspaceStorageAccounts, string defaultWorkspaceResourceGroup) + { + AdditionalWorkspaceStorageAccounts = additionalWorkspaceStorageAccounts; + DefaultWorkspaceResourceGroup = defaultWorkspaceResourceGroup; + } + + /// Gets the additional workspace storage accounts. + public IList AdditionalWorkspaceStorageAccounts { get; } + /// Gets or sets the default workspace resource group. + public string DefaultWorkspaceResourceGroup { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs index f9570280dcb90..5ae55f8ca2c0d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs @@ -20,10 +20,15 @@ internal static WorkspaceListResult DeserializeWorkspaceListResult(JsonElement e { return null; } - Optional> value = default; Optional nextLink = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -38,13 +43,8 @@ internal static WorkspaceListResult DeserializeWorkspaceListResult(JsonElement e value = array; continue; } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } } - return new WorkspaceListResult(Optional.ToList(value), nextLink.Value); + return new WorkspaceListResult(nextLink.Value, Optional.ToList(value)); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs index e69019b0282c1..675b6f3976db6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs @@ -21,17 +21,17 @@ internal WorkspaceListResult() } /// Initializes a new instance of WorkspaceListResult. + /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. /// 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 URI that can be used to request the next list of machine learning workspaces. - internal WorkspaceListResult(IReadOnlyList value, string nextLink) + internal WorkspaceListResult(string nextLink, IReadOnlyList value) { - Value = value; NextLink = nextLink; + Value = value; } + /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. + public string NextLink { get; } /// 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. public IReadOnlyList Value { get; } - /// The URI that can be used to request the next list of machine learning workspaces. - public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs index 394b8b4ba5eb7..0d3fbb1d67f1a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs @@ -33,7 +33,7 @@ public BatchDeploymentsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs index 7f12870bf5624..1e8ffed85938d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs @@ -33,7 +33,7 @@ public BatchEndpointsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs index 12cdbac722617..c9e5d9b568c77 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs @@ -33,7 +33,7 @@ public CodeContainersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs index 8238aae9d08ad..846d8be4f5b8c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs @@ -33,11 +33,11 @@ public CodeVersionsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string hash, string hashVersion) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -66,6 +66,14 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { uri.AppendQuery("$skip", skip, true); } + if (hash != null) + { + uri.AppendQuery("hash", hash, true); + } + if (hashVersion != null) + { + uri.AppendQuery("hashVersion", hashVersion, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -80,17 +88,19 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Ordering of list. /// Maximum number of records to return. /// Continuation token for pagination. + /// If specified, return CodeVersion assets with specified content hash value, regardless of name. + /// Hash algorithm version when listing by hash. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string hash = null, string hashVersion = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -114,17 +124,19 @@ public async Task> ListAsync(str /// Ordering of list. /// Maximum number of records to return. /// Continuation token for pagination. + /// If specified, return CodeVersion assets with specified content hash value, regardless of name. + /// Hash algorithm version when listing by hash. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string hash = null, string hashVersion = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -416,7 +428,106 @@ public Response CreateOrUpdate(string subscripti } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip) + internal HttpMessage CreateCreateOrGetStartPendingUploadRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, PendingUploadRequestDto body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/startPendingUpload", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generate a storage location and credential for the client to upload a code asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrGetStartPendingUploadAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, workspaceName, name, version, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generate a storage location and credential for the client to upload a code asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrGetStartPendingUpload(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, workspaceName, name, version, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string hash, string hashVersion) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -439,10 +550,12 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Ordering of list. /// Maximum number of records to return. /// Continuation token for pagination. + /// If specified, return CodeVersion assets with specified content hash value, regardless of name. + /// Hash algorithm version when listing by hash. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string hash = null, string hashVersion = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -450,7 +563,7 @@ public async Task> ListNextPageA Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -475,10 +588,12 @@ public async Task> ListNextPageA /// Ordering of list. /// Maximum number of records to return. /// Continuation token for pagination. + /// If specified, return CodeVersion assets with specified content hash value, regardless of name. + /// Hash algorithm version when listing by hash. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string hash = null, string hashVersion = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -486,7 +601,7 @@ public Response ListNextPage(string nextL Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs index d56b8d8598cb1..f59c835a67f8a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs @@ -33,7 +33,7 @@ public ComponentContainersRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs index 7067ec8a3d350..d33b34ded7368 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs @@ -33,11 +33,11 @@ public ComponentVersionsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -70,6 +70,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -85,17 +89,18 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Component stage. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -120,17 +125,18 @@ public async Task> ListAsyn /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Component stage. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -422,7 +428,7 @@ public Response CreateOrUpdate(string subsc } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -446,10 +452,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Component stage. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -457,7 +464,7 @@ public async Task> ListNext Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -483,10 +490,11 @@ public async Task> ListNext /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Component stage. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -494,7 +502,7 @@ public Response ListNextPage(string Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs index d30e269faa609..0f6e46908d17e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -33,7 +34,7 @@ public ComputeRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -457,6 +458,94 @@ public Response Delete(string subscriptionId, string resourceGroupName, string w } } + internal HttpMessage CreateUpdateCustomServicesRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable customServices) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendPath("/customServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + foreach (var item in customServices) + { + content.JsonWriter.WriteObjectValue(item); + } + content.JsonWriter.WriteEndArray(); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the custom services list. The list of custom services provided shall be overwritten. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// New list of Custom Services. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateCustomServicesAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable customServices, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(customServices, nameof(customServices)); + + using var message = CreateUpdateCustomServicesRequest(subscriptionId, resourceGroupName, workspaceName, computeName, customServices); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the custom services list. The list of custom services provided shall be overwritten. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// New list of Custom Services. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateCustomServices(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable customServices, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(customServices, nameof(customServices)); + + using var message = CreateUpdateCustomServicesRequest(subscriptionId, resourceGroupName, workspaceName, computeName, customServices); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListNodesRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName) { var message = _pipeline.CreateMessage(); @@ -852,6 +941,89 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } + internal HttpMessage CreateUpdateIdleShutdownSettingRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IdleShutdownSetting idleShutdownSetting) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendPath("/updateIdleShutdownSetting", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(idleShutdownSetting); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the idle shutdown setting of a compute instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The object for updating idle shutdown setting of specified ComputeInstance. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateIdleShutdownSettingAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); + + using var message = CreateUpdateIdleShutdownSettingRequest(subscriptionId, resourceGroupName, workspaceName, computeName, idleShutdownSetting); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the idle shutdown setting of a compute instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The object for updating idle shutdown setting of specified ComputeInstance. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateIdleShutdownSetting(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); + + using var message = CreateUpdateIdleShutdownSettingRequest(subscriptionId, resourceGroupName, workspaceName, computeName, idleShutdownSetting); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip) { var message = _pipeline.CreateMessage(); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs index eb950c3864b67..1e17c706a6fd7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs @@ -33,7 +33,7 @@ public DataContainersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs index 536eed1f4f458..af0e6d6435b2f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs @@ -33,11 +33,11 @@ public DataVersionsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -74,6 +74,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -93,17 +97,18 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Continuation token for pagination. /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// data stage. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -132,17 +137,18 @@ public async Task> ListAsync /// Continuation token for pagination. /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// data stage. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -434,7 +440,7 @@ public Response CreateOrUpdate(string subscripti } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -462,10 +468,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Continuation token for pagination. /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// data stage. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -473,7 +480,7 @@ public async Task> ListNextP Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -503,10 +510,11 @@ public async Task> ListNextP /// Continuation token for pagination. /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// data stage. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -514,7 +522,7 @@ public Response ListNextPage(string n Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs index 6aa91daee3b80..1cf870168778b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs @@ -34,7 +34,7 @@ public DatastoresRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs index 572c7e9711db7..289ac30febf50 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs @@ -33,7 +33,7 @@ public EnvironmentContainersRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs index 10de117d5530c..0ec04ac2286c4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs @@ -33,11 +33,11 @@ public EnvironmentVersionsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -70,6 +70,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -85,17 +89,18 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -120,17 +125,18 @@ public async Task> ListAs /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -422,7 +428,7 @@ public Response CreateOrUpdate(string sub } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -446,10 +452,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -457,7 +464,7 @@ public async Task> ListNe Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -483,10 +490,11 @@ public async Task> ListNe /// Maximum number of records to return. /// Continuation token for pagination. /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -494,7 +502,7 @@ public Response ListNextPage(strin Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs new file mode 100644 index 0000000000000..76b852e99ac3e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class FeaturesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FeaturesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FeaturesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string skip, string tags, string featureName, string description) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(featuresetName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(featuresetVersion, true); + uri.AppendPath("/features", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (featureName != null) + { + uri.AppendQuery("featureName", featureName, true); + } + if (description != null) + { + uri.AppendQuery("description", description, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Features. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Featureset Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// feature name. + /// Description of the featureset. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string skip = null, string tags = null, string featureName = null, string description = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(featuresetName, nameof(featuresetName)); + Argument.AssertNotNullOrEmpty(featuresetVersion, nameof(featuresetVersion)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, description); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeatureResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeatureResourceArmPaginatedResult.DeserializeFeatureResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Features. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Featureset Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// feature name. + /// Description of the featureset. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string skip = null, string tags = null, string featureName = null, string description = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(featuresetName, nameof(featuresetName)); + Argument.AssertNotNullOrEmpty(featuresetVersion, nameof(featuresetVersion)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, description); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeatureResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeatureResourceArmPaginatedResult.DeserializeFeatureResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string featureName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(featuresetName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(featuresetVersion, true); + uri.AppendPath("/features/", false); + uri.AppendPath(featureName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get feature. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Feature set name. This is case-sensitive. + /// Feature set version identifier. This is case-sensitive. + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(featuresetName, nameof(featuresetName)); + Argument.AssertNotNullOrEmpty(featuresetVersion, nameof(featuresetVersion)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningFeatureData.DeserializeMachineLearningFeatureData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get feature. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Feature set name. This is case-sensitive. + /// Feature set version identifier. This is case-sensitive. + /// Feature Name. This is case-sensitive. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string featureName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(featuresetName, nameof(featuresetName)); + Argument.AssertNotNullOrEmpty(featuresetVersion, nameof(featuresetVersion)); + Argument.AssertNotNullOrEmpty(featureName, nameof(featureName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningFeatureData.DeserializeMachineLearningFeatureData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string skip, string tags, string featureName, string description) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Features. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Featureset Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// feature name. + /// Description of the featureset. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string skip = null, string tags = null, string featureName = null, string description = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(featuresetName, nameof(featuresetName)); + Argument.AssertNotNullOrEmpty(featuresetVersion, nameof(featuresetVersion)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, description); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeatureResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeatureResourceArmPaginatedResult.DeserializeFeatureResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Features. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Featureset Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// feature name. + /// Description of the featureset. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string featuresetName, string featuresetVersion, string skip = null, string tags = null, string featureName = null, string description = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(featuresetName, nameof(featuresetName)); + Argument.AssertNotNullOrEmpty(featuresetVersion, nameof(featuresetVersion)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, description); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeatureResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeatureResourceArmPaginatedResult.DeserializeFeatureResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs new file mode 100644 index 0000000000000..db64689879c9c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class FeaturesetContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FeaturesetContainersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FeaturesetContainersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string name, string description, string createdBy) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (name != null) + { + uri.AppendQuery("name", name, true); + } + if (description != null) + { + uri.AppendQuery("description", description, true); + } + if (createdBy != null) + { + uri.AppendQuery("createdBy", createdBy, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List featurestore entity containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset. + /// description for the feature set. + /// createdBy user name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturesetContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturesetContainerResourceArmPaginatedResult.DeserializeFeaturesetContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List featurestore entity containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset. + /// description for the feature set. + /// createdBy user name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturesetContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturesetContainerResourceArmPaginatedResult.DeserializeFeaturesetContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEntityRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetEntityRequest(subscriptionId, resourceGroupName, workspaceName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureSetContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningFeatureSetContainerData.DeserializeMachineLearningFeatureSetContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureSetContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntity(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetEntityRequest(subscriptionId, resourceGroupName, workspaceName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureSetContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningFeatureSetContainerData.DeserializeMachineLearningFeatureSetContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureSetContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningFeatureSetContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningFeatureSetContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningFeatureSetContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string name, string description, string createdBy) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List featurestore entity containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset. + /// description for the feature set. + /// createdBy user name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturesetContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturesetContainerResourceArmPaginatedResult.DeserializeFeaturesetContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List featurestore entity containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset. + /// description for the feature set. + /// createdBy user name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturesetContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturesetContainerResourceArmPaginatedResult.DeserializeFeaturesetContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs new file mode 100644 index 0000000000000..e9f297eaddf20 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs @@ -0,0 +1,843 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class FeaturesetVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FeaturesetVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FeaturesetVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string versionName, string version, string description, string createdBy, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (versionName != null) + { + uri.AppendQuery("versionName", versionName, true); + } + if (version != null) + { + uri.AppendQuery("version", version, true); + } + if (description != null) + { + uri.AppendQuery("description", description, true); + } + if (createdBy != null) + { + uri.AppendQuery("createdBy", createdBy, true); + } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset version. + /// featureset version. + /// description for the feature set version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturesetVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturesetVersionResourceArmPaginatedResult.DeserializeFeaturesetVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset version. + /// featureset version. + /// description for the feature set version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturesetVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturesetVersionResourceArmPaginatedResult.DeserializeFeaturesetVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureSetVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningFeatureSetVersionData.DeserializeMachineLearningFeatureSetVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureSetVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureSetVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningFeatureSetVersionData.DeserializeMachineLearningFeatureSetVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureSetVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningFeatureSetVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningFeatureSetVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, version, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningFeatureSetVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, version, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateBackfillRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, FeatureSetVersionBackfillContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/backfill", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Backfill. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Feature set version backfill request entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task BackfillAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, FeatureSetVersionBackfillContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBackfillRequest(subscriptionId, resourceGroupName, workspaceName, name, version, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Backfill. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Feature set version backfill request entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Backfill(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, FeatureSetVersionBackfillContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateBackfillRequest(subscriptionId, resourceGroupName, workspaceName, name, version, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListMaterializationJobsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, string skip, string filters, string featureWindowStart, string featureWindowEnd) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featuresets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/listMaterializationJobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (filters != null) + { + uri.AppendQuery("filters", filters, true); + } + if (featureWindowStart != null) + { + uri.AppendQuery("featureWindowStart", featureWindowStart, true); + } + if (featureWindowEnd != null) + { + uri.AppendQuery("featureWindowEnd", featureWindowEnd, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List materialization Jobs. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Start time of the feature window to filter materialization jobs. + /// End time of the feature window to filter materialization jobs. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListMaterializationJobsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateListMaterializationJobsRequest(subscriptionId, resourceGroupName, workspaceName, name, version, skip, filters, featureWindowStart, featureWindowEnd); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturesetJobArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturesetJobArmPaginatedResult.DeserializeFeaturesetJobArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List materialization Jobs. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Start time of the feature window to filter materialization jobs. + /// End time of the feature window to filter materialization jobs. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListMaterializationJobs(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateListMaterializationJobsRequest(subscriptionId, resourceGroupName, workspaceName, name, version, skip, filters, featureWindowStart, featureWindowEnd); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturesetJobArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturesetJobArmPaginatedResult.DeserializeFeaturesetJobArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string versionName, string version, string description, string createdBy, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset version. + /// featureset version. + /// description for the feature set version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturesetVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturesetVersionResourceArmPaginatedResult.DeserializeFeaturesetVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Featureset name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featureset version. + /// featureset version. + /// description for the feature set version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturesetVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturesetVersionResourceArmPaginatedResult.DeserializeFeaturesetVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListMaterializationJobsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, string skip, string filters, string featureWindowStart, string featureWindowEnd) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List materialization Jobs. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Start time of the feature window to filter materialization jobs. + /// End time of the feature window to filter materialization jobs. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListMaterializationJobsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateListMaterializationJobsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, version, skip, filters, featureWindowStart, featureWindowEnd); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturesetJobArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturesetJobArmPaginatedResult.DeserializeFeaturesetJobArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List materialization Jobs. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Start time of the feature window to filter materialization jobs. + /// End time of the feature window to filter materialization jobs. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListMaterializationJobsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, string skip = null, string filters = null, string featureWindowStart = null, string featureWindowEnd = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateListMaterializationJobsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, version, skip, filters, featureWindowStart, featureWindowEnd); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturesetJobArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturesetJobArmPaginatedResult.DeserializeFeaturesetJobArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs new file mode 100644 index 0000000000000..583b48a9256f6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class FeaturestoreEntityContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FeaturestoreEntityContainersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FeaturestoreEntityContainersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string name, string description, string createdBy) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (name != null) + { + uri.AppendQuery("name", name, true); + } + if (description != null) + { + uri.AppendQuery("description", description, true); + } + if (createdBy != null) + { + uri.AppendQuery("createdBy", createdBy, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List featurestore entity containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity. + /// description for the featurestore entity. + /// createdBy user name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturestoreEntityContainerResourceArmPaginatedResult.DeserializeFeaturestoreEntityContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List featurestore entity containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity. + /// description for the featurestore entity. + /// createdBy user name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturestoreEntityContainerResourceArmPaginatedResult.DeserializeFeaturestoreEntityContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetEntityRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetEntityRequest(subscriptionId, resourceGroupName, workspaceName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureStoreEntityContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningFeatureStoreEntityContainerData.DeserializeMachineLearningFeatureStoreEntityContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureStoreEntityContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntity(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetEntityRequest(subscriptionId, resourceGroupName, workspaceName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeatureStoreEntityContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningFeatureStoreEntityContainerData.DeserializeMachineLearningFeatureStoreEntityContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeatureStoreEntityContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningFeatureStoreEntityContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningFeatureStoreEntityContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningFeatureStoreEntityContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string name, string description, string createdBy) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List featurestore entity containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity. + /// description for the featurestore entity. + /// createdBy user name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturestoreEntityContainerResourceArmPaginatedResult.DeserializeFeaturestoreEntityContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List featurestore entity containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity. + /// description for the featurestore entity. + /// createdBy user name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string name = null, string description = null, string createdBy = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturestoreEntityContainerResourceArmPaginatedResult.DeserializeFeaturestoreEntityContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs new file mode 100644 index 0000000000000..7103ca0ba6950 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs @@ -0,0 +1,545 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class FeaturestoreEntityVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FeaturestoreEntityVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FeaturestoreEntityVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string versionName, string version, string description, string createdBy, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (versionName != null) + { + uri.AppendQuery("versionName", versionName, true); + } + if (version != null) + { + uri.AppendQuery("version", version, true); + } + if (description != null) + { + uri.AppendQuery("description", description, true); + } + if (createdBy != null) + { + uri.AppendQuery("createdBy", createdBy, true); + } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Feature entity name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity version. + /// featurestore entity version. + /// description for the feature entity version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturestoreEntityVersionResourceArmPaginatedResult.DeserializeFeaturestoreEntityVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Feature entity name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity version. + /// featurestore entity version. + /// description for the feature entity version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturestoreEntityVersionResourceArmPaginatedResult.DeserializeFeaturestoreEntityVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeaturestoreEntityVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningFeaturestoreEntityVersionData.DeserializeMachineLearningFeaturestoreEntityVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeaturestoreEntityVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, name, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningFeaturestoreEntityVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningFeaturestoreEntityVersionData.DeserializeMachineLearningFeaturestoreEntityVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningFeaturestoreEntityVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningFeaturestoreEntityVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/featurestoreEntities/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningFeaturestoreEntityVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, version, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningFeaturestoreEntityVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, name, version, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string tags, MachineLearningListViewType? listViewType, int? pageSize, string versionName, string version, string description, string createdBy, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Feature entity name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity version. + /// featurestore entity version. + /// description for the feature entity version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FeaturestoreEntityVersionResourceArmPaginatedResult.DeserializeFeaturestoreEntityVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Feature entity name. This is case-sensitive. + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// page size. + /// name for the featurestore entity version. + /// featurestore entity version. + /// description for the feature entity version. + /// createdBy user name. + /// Specifies the featurestore stage. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, int? pageSize = null, string versionName = null, string version = null, string description = null, string createdBy = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, description, createdBy, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FeaturestoreEntityVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FeaturestoreEntityVersionResourceArmPaginatedResult.DeserializeFeaturestoreEntityVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs index 825dac026f1f0..13b5d54467ad1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs @@ -33,11 +33,11 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, MachineLearningListViewType? listViewType, string assetName, bool? scheduled, string scheduleId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -68,6 +68,18 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); } + if (assetName != null) + { + uri.AppendQuery("assetName", assetName, true); + } + if (scheduled != null) + { + uri.AppendQuery("scheduled", scheduled.Value, true); + } + if (scheduleId != null) + { + uri.AppendQuery("scheduleId", scheduleId, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -82,16 +94,19 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Type of job to be returned. /// Jobs returned will have this tag key. /// View type for including/excluding (for example) archived entities. + /// Asset name the job's named output is registered with. + /// Indicator whether the job is scheduled job. + /// The scheduled id for listing the job triggered from. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, string assetName = null, bool? scheduled = null, string scheduleId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType, assetName, scheduled, scheduleId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -115,16 +130,19 @@ public async Task> ListAsync(string /// Type of job to be returned. /// Jobs returned will have this tag key. /// View type for including/excluding (for example) archived entities. + /// Asset name the job's named output is registered with. + /// Indicator whether the job is scheduled job. + /// The scheduled id for listing the job triggered from. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, string assetName = null, bool? scheduled = null, string scheduleId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType, assetName, scheduled, scheduleId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -306,6 +324,98 @@ public Response Get(string subscriptionId, string resour } } + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id, MachineLearningJobPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the Job. This is case-sensitive. + /// Job definition to apply during the operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string id, MachineLearningJobPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, id, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningJobData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningJobData.DeserializeMachineLearningJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a Job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the Job. This is case-sensitive. + /// Job definition to apply during the operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, string id, MachineLearningJobPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, id, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningJobData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningJobData.DeserializeMachineLearningJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id, MachineLearningJobData data) { var message = _pipeline.CreateMessage(); @@ -477,7 +587,7 @@ public Response Cancel(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, MachineLearningListViewType? listViewType, string assetName, bool? scheduled, string scheduleId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -500,17 +610,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Type of job to be returned. /// Jobs returned will have this tag key. /// View type for including/excluding (for example) archived entities. + /// Asset name the job's named output is registered with. + /// Indicator whether the job is scheduled job. + /// The scheduled id for listing the job triggered from. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, string assetName = null, bool? scheduled = null, string scheduleId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType, assetName, scheduled, scheduleId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -535,17 +648,20 @@ public async Task> ListNextPageAsync /// Type of job to be returned. /// Jobs returned will have this tag key. /// View type for including/excluding (for example) archived entities. + /// Asset name the job's named output is registered with. + /// Indicator whether the job is scheduled job. + /// The scheduled id for listing the job triggered from. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, string assetName = null, bool? scheduled = null, string scheduleId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, jobType, tag, listViewType, assetName, scheduled, scheduleId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/LabelingJobsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/LabelingJobsRestOperations.cs new file mode 100644 index 0000000000000..f980925047fb5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/LabelingJobsRestOperations.cs @@ -0,0 +1,708 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class LabelingJobsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of LabelingJobsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public LabelingJobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists labeling jobs in the workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists labeling jobs in the workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, skip, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a labeling job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, id); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a labeling job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, id); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id, bool? includeJobInstructions, bool? includeLabelCategories) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (includeJobInstructions != null) + { + uri.AppendQuery("includeJobInstructions", includeJobInstructions.Value, true); + } + if (includeLabelCategories != null) + { + uri.AppendQuery("includeLabelCategories", includeLabelCategories.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a labeling job by name/id. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningLabelingJobData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningLabelingJobData.DeserializeMachineLearningLabelingJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningLabelingJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a labeling job by name/id. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string id, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, id, includeJobInstructions, includeLabelCategories); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningLabelingJobData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningLabelingJobData.DeserializeMachineLearningLabelingJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningLabelingJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id, MachineLearningLabelingJobData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a labeling job (asynchronous). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// LabelingJob definition object. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string id, MachineLearningLabelingJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, id, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a labeling job (asynchronous). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// LabelingJob definition object. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string id, MachineLearningLabelingJobData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, id, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateExportLabelsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id, ExportSummary body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/exportLabels", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Export labels from a labeling job (asynchronous). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The export summary. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ExportLabelsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string id, ExportSummary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateExportLabelsRequest(subscriptionId, resourceGroupName, workspaceName, id, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Export labels from a labeling job (asynchronous). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The export summary. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ExportLabels(string subscriptionId, string resourceGroupName, string workspaceName, string id, ExportSummary body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateExportLabelsRequest(subscriptionId, resourceGroupName, workspaceName, id, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePauseRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/pause", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Pause a labeling job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task PauseAsync(string subscriptionId, string resourceGroupName, string workspaceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreatePauseRequest(subscriptionId, resourceGroupName, workspaceName, id); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Pause a labeling job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Pause(string subscriptionId, string resourceGroupName, string workspaceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreatePauseRequest(subscriptionId, resourceGroupName, workspaceName, id); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateResumeRequest(string subscriptionId, string resourceGroupName, string workspaceName, string id) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/resume", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Resume a labeling job (asynchronous). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ResumeAsync(string subscriptionId, string resourceGroupName, string workspaceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateResumeRequest(subscriptionId, resourceGroupName, workspaceName, id); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Resume a labeling job (asynchronous). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The name and identifier for the LabelingJob. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Resume(string subscriptionId, string resourceGroupName, string workspaceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateResumeRequest(subscriptionId, resourceGroupName, workspaceName, id); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists labeling jobs in the workspace. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists labeling jobs in the workspace. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, skip, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs new file mode 100644 index 0000000000000..3a8b13d1f3e9c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class ManagedNetworkProvisionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ManagedNetworkProvisionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ManagedNetworkProvisionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateProvisionManagedNetworkRequest(string subscriptionId, string resourceGroupName, string workspaceName, ManagedNetworkProvisionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/provisionManagedNetwork", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Provisions the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Managed Network Provisioning Options for a machine learning workspace. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ProvisionManagedNetworkAsync(string subscriptionId, string resourceGroupName, string workspaceName, ManagedNetworkProvisionContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateProvisionManagedNetworkRequest(subscriptionId, resourceGroupName, workspaceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Provisions the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Managed Network Provisioning Options for a machine learning workspace. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ProvisionManagedNetwork(string subscriptionId, string resourceGroupName, string workspaceName, ManagedNetworkProvisionContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateProvisionManagedNetworkRequest(subscriptionId, resourceGroupName, workspaceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs new file mode 100644 index 0000000000000..b24ef8dcef0a5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class ManagedNetworkSettingsRuleRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ManagedNetworkSettingsRuleRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ManagedNetworkSettingsRuleRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/outboundRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the managed network outbound rules for a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OutboundRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OutboundRuleListResult.DeserializeOutboundRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the managed network outbound rules for a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OutboundRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OutboundRuleListResult.DeserializeOutboundRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/outboundRules/", false); + uri.AppendPath(ruleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes an outbound rule from the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, ruleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes an outbound rule from the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, ruleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/outboundRules/", false); + uri.AppendPath(ruleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, ruleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningOutboundRuleBasicData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningOutboundRuleBasicData.DeserializeMachineLearningOutboundRuleBasicData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningOutboundRuleBasicData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, ruleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningOutboundRuleBasicData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningOutboundRuleBasicData.DeserializeMachineLearningOutboundRuleBasicData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningOutboundRuleBasicData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName, MachineLearningOutboundRuleBasicData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/outboundRules/", false); + uri.AppendPath(ruleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates an outbound rule in the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the workspace managed network outbound rule. + /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName, MachineLearningOutboundRuleBasicData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, ruleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates an outbound rule in the managed network of a machine learning workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Name of the workspace managed network outbound rule. + /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string ruleName, MachineLearningOutboundRuleBasicData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(ruleName, nameof(ruleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, ruleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the managed network outbound rules for a machine learning workspace. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OutboundRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OutboundRuleListResult.DeserializeOutboundRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the managed network outbound rules for a machine learning workspace. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OutboundRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OutboundRuleListResult.DeserializeOutboundRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs index 70fc667300dcc..1894153b7ec7c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs @@ -33,7 +33,7 @@ public ModelContainersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs index f564cba2f564a..f9792db945214 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs @@ -33,11 +33,11 @@ public ModelVersionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -94,6 +94,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -115,17 +119,18 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. /// Name of the feed. /// View type for including/excluding (for example) archived entities. + /// Model stage. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -156,17 +161,18 @@ public async Task> ListAsync(st /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. /// Name of the feed. /// View type for including/excluding (for example) archived entities. + /// Model stage. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -458,7 +464,98 @@ public Response CreateOrUpdate(string subscript } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType) + internal HttpMessage CreatePackageRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, ModelPackageContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/package", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Model Version Package operation. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Package operation request body. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task PackageAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePackageRequest(subscriptionId, resourceGroupName, workspaceName, name, version, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Model Version Package operation. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Package operation request body. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Package(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePackageRequest(subscriptionId, resourceGroupName, workspaceName, name, version, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType, string stage) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -488,10 +585,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. /// Name of the feed. /// View type for including/excluding (for example) archived entities. + /// Model stage. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -499,7 +597,7 @@ public async Task> ListNextPage Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, stage); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -531,10 +629,11 @@ public async Task> ListNextPage /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. /// Name of the feed. /// View type for including/excluding (for example) archived entities. + /// Model stage. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -542,7 +641,7 @@ public Response ListNextPage(string next Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, stage); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs index 9cb09f9631613..b02db4f157e94 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs @@ -33,7 +33,7 @@ public OnlineDeploymentsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs index 4f1b90cb48336..1855d9af47356 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs @@ -33,7 +33,7 @@ public OnlineEndpointsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -685,7 +685,7 @@ internal HttpMessage CreateGetTokenRequest(string subscriptionId, string resourc return message; } - /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + /// Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. @@ -716,7 +716,7 @@ public async Task> GetTokenAsync(stri } } - /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + /// Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index d1092f42dc586..f4815068568af 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -58,7 +58,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List all the private endpoint connections associated with the workspace. + /// Called by end-users to get all PE connections. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. @@ -87,7 +87,7 @@ public async Task> } } - /// List all the private endpoint connections associated with the workspace. + /// Called by end-users to get all PE connections. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. @@ -116,11 +116,11 @@ public Response List(string } } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -138,77 +138,65 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the specified private endpoint connection associated with the workspace. + /// Called by end-users to delete a PE connection. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MachineLearningPrivateEndpointConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the specified private endpoint connection associated with the workspace. + /// Called by end-users to delete a PE connection. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MachineLearningPrivateEndpointConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -222,32 +210,26 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update the state of specified private endpoint connection associated with the workspace. + /// Called by end-users to get a PE connection. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The name of the private endpoint connection associated with the workspace. - /// The private endpoint connection properties. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -258,29 +240,29 @@ public async Task> Create value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Update the state of specified private endpoint connection associated with the workspace. + /// Called by end-users to get a PE connection. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The name of the private endpoint connection associated with the workspace. - /// The private endpoint connection properties. + /// NRP Private Endpoint Connection Name. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -291,16 +273,18 @@ public Response CreateOrUpdate(str value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -314,59 +298,81 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; _userAgent.Apply(message); return message; } - /// 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. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. + /// PrivateEndpointConnection object. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningPrivateEndpointConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// 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. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The name of the private endpoint connection associated with the workspace. + /// NRP Private Endpoint Connection Name. + /// PrivateEndpointConnection object. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningPrivateEndpointConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index eea18a9ce7789..a62b50c0eb5cd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -58,7 +58,13 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// 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". + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. @@ -87,7 +93,13 @@ public async Task> ListAs } } - /// 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". + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs index 7ac1a77e6a724..754746dbb8e22 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs @@ -33,7 +33,7 @@ public QuotasRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs new file mode 100644 index 0000000000000..836ce3d80488d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs @@ -0,0 +1,717 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistriesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistriesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List registries by subscription. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List registries by subscription. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List registries. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List registries. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningRegistryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningRegistryData.DeserializeMachineLearningRegistryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningRegistryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningRegistryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningRegistryData.DeserializeMachineLearningRegistryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningRegistryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update tags. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningRegistryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningRegistryData.DeserializeMachineLearningRegistryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update tags. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningRegistryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningRegistryData.DeserializeMachineLearningRegistryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateRemoveRegionsRequest(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/removeRegions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Remove regions from registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RemoveRegionsAsync(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateRemoveRegionsRequest(subscriptionId, resourceGroupName, registryName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove regions from registry. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Details required to create the registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RemoveRegions(string subscriptionId, string resourceGroupName, string registryName, MachineLearningRegistryData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateRemoveRegionsRequest(subscriptionId, resourceGroupName, registryName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List registries by subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List registries by subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List registries. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List registries. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RegistryTrackedResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RegistryTrackedResourceArmPaginatedResult.DeserializeRegistryTrackedResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs new file mode 100644 index 0000000000000..2b6ad62d16aec --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs @@ -0,0 +1,453 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryCodeContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryCodeContainersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryCodeContainersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete Code container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, codeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete Code container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, codeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Code container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, codeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningCodeContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningCodeContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Code container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string codeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, codeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningCodeContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningCodeContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName, MachineLearningCodeContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update Code container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, codeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update Code container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string codeName, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, codeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs new file mode 100644 index 0000000000000..2b64dcca68971 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs @@ -0,0 +1,596 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryCodeVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryCodeVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryCodeVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName, string orderBy, int? top, string skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (orderBy != null) + { + uri.AppendQuery("$orderBy", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, codeName, orderBy, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string codeName, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, codeName, orderBy, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, codeName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, codeName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, codeName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningCodeVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningCodeVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, codeName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningCodeVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningCodeVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, MachineLearningCodeVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, codeName, version, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, codeName, version, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrGetStartPendingUploadRequest(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, PendingUploadRequestDto body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(codeName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/startPendingUpload", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generate a storage location and credential for the client to upload a code asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Pending upload name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrGetStartPendingUploadAsync(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, registryName, codeName, version, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generate a storage location and credential for the client to upload a code asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Pending upload name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrGetStartPendingUpload(string subscriptionId, string resourceGroupName, string registryName, string codeName, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, registryName, codeName, version, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string codeName, string orderBy, int? top, string skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string codeName, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, codeName, orderBy, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string codeName, string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(codeName, nameof(codeName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, codeName, orderBy, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs new file mode 100644 index 0000000000000..a86c0387f41ef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs @@ -0,0 +1,453 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryComponentContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryComponentContainersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryComponentContainersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComponentContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ComponentContainerResourceArmPaginatedResult.DeserializeComponentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComponentContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ComponentContainerResourceArmPaginatedResult.DeserializeComponentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string componentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components/", false); + uri.AppendPath(componentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, componentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, componentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string componentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components/", false); + uri.AppendPath(componentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, componentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningComponentContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningComponentContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, componentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningComponentContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningComponentContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string componentName, MachineLearningComponentContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components/", false); + uri.AppendPath(componentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string componentName, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, componentName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string componentName, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, componentName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComponentContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ComponentContainerResourceArmPaginatedResult.DeserializeComponentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComponentContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ComponentContainerResourceArmPaginatedResult.DeserializeComponentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs new file mode 100644 index 0000000000000..573a2dd67ac63 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryComponentVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryComponentVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryComponentVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string componentName, string orderBy, int? top, string skip, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (orderBy != null) + { + uri.AppendQuery("$orderBy", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// Component stage. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string componentName, string orderBy = null, int? top = null, string skip = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, componentName, orderBy, top, skip, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComponentVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ComponentVersionResourceArmPaginatedResult.DeserializeComponentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// Component stage. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string componentName, string orderBy = null, int? top = null, string skip = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, componentName, orderBy, top, skip, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComponentVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ComponentVersionResourceArmPaginatedResult.DeserializeComponentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, componentName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, componentName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, componentName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningComponentVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningComponentVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, componentName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningComponentVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningComponentVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version, MachineLearningComponentVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/components/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, componentName, version, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string componentName, string version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, componentName, version, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string componentName, string orderBy, int? top, string skip, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// Component stage. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string componentName, string orderBy = null, int? top = null, string skip = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, componentName, orderBy, top, skip, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComponentVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ComponentVersionResourceArmPaginatedResult.DeserializeComponentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// Component stage. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string componentName, string orderBy = null, int? top = null, string skip = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, componentName, orderBy, top, skip, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComponentVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ComponentVersionResourceArmPaginatedResult.DeserializeComponentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs new file mode 100644 index 0000000000000..ddfbc3561b72a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryDataContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryDataContainersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryDataContainersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string skip, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Data containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Data containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningDataContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningDataContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningDataContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningDataContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string name, MachineLearningDataContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Data containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Data containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs new file mode 100644 index 0000000000000..01b7a50768274 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs @@ -0,0 +1,624 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryDataVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryDataVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryDataVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (orderBy != null) + { + uri.AppendQuery("$orderBy", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (tags != null) + { + uri.AppendQuery("$tags", tags, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List data versions in the data container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Data container's name. + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataVersionBaseResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataVersionBaseResourceArmPaginatedResult.DeserializeDataVersionBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List data versions in the data container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Data container's name. + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataVersionBaseResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataVersionBaseResourceArmPaginatedResult.DeserializeDataVersionBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string name, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, name, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, name, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string name, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, name, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningDataVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningDataVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, name, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningDataVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningDataVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string name, string version, MachineLearningDataVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string name, string version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, name, version, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string name, string version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, name, version, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrGetStartPendingUploadRequest(string subscriptionId, string resourceGroupName, string registryName, string name, string version, PendingUploadRequestDto body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/startPendingUpload", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generate a storage location and credential for the client to upload a data asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Data asset name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrGetStartPendingUploadAsync(string subscriptionId, string resourceGroupName, string registryName, string name, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, registryName, name, version, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generate a storage location and credential for the client to upload a data asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Data asset name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrGetStartPendingUpload(string subscriptionId, string resourceGroupName, string registryName, string name, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, registryName, name, version, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List data versions in the data container. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Data container's name. + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataVersionBaseResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataVersionBaseResourceArmPaginatedResult.DeserializeDataVersionBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List data versions in the data container. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Data container's name. + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataVersionBaseResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataVersionBaseResourceArmPaginatedResult.DeserializeDataVersionBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs new file mode 100644 index 0000000000000..39f40c62ebfd4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryEnvironmentContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryEnvironmentContainersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryEnvironmentContainersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string skip, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List environment containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List environment containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningEnvironmentContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningEnvironmentContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningEnvironmentContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningEnvironmentContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string environmentName, MachineLearningEnvironmentContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string environmentName, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, environmentName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string environmentName, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, environmentName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List environment containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List environment containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs new file mode 100644 index 0000000000000..6f7995269aa05 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryEnvironmentVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryEnvironmentVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryEnvironmentVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (orderBy != null) + { + uri.AppendQuery("$orderBy", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + if (stage != null) + { + uri.AppendQuery("stage", stage, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentVersionResourceArmPaginatedResult.DeserializeEnvironmentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentVersionResourceArmPaginatedResult.DeserializeEnvironmentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, environmentName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, environmentName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, environmentName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningEnvironmentVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningEnvironmentVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, environmentName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningEnvironmentVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningEnvironmentVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version, MachineLearningEnvironmentVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, environmentName, version, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string environmentName, string version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, environmentName, version, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string environmentName, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType, string stage) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string environmentName, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, stage); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentVersionResourceArmPaginatedResult.DeserializeEnvironmentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string environmentName, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, string stage = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, stage); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentVersionResourceArmPaginatedResult.DeserializeEnvironmentVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs new file mode 100644 index 0000000000000..ae45fa2925e67 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryModelContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryModelContainersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryModelContainersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string skip, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List model containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List model containers. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, skip, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, modelName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, modelName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, modelName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningModelContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningModelContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string modelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, modelName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningModelContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningModelContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName, MachineLearningModelContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update model container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, modelName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update model container. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string modelName, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, modelName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List model containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List model containers. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, skip, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs new file mode 100644 index 0000000000000..577213bbabd8f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs @@ -0,0 +1,727 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal partial class RegistryModelVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryModelVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RegistryModelVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName, string skip, string orderBy, int? top, string version, string description, string tags, string properties, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (orderBy != null) + { + uri.AppendQuery("$orderBy", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (version != null) + { + uri.AppendQuery("version", version, true); + } + if (description != null) + { + uri.AppendQuery("description", description, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (properties != null) + { + uri.AppendQuery("properties", properties, true); + } + if (listViewType != null) + { + uri.AppendQuery("listViewType", listViewType.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Continuation token for pagination. + /// Ordering of list. + /// Maximum number of records to return. + /// Version identifier. + /// Model description. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, string tags = null, string properties = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, modelName, skip, orderBy, top, version, description, tags, properties, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Continuation token for pagination. + /// Ordering of list. + /// Maximum number of records to return. + /// Version identifier. + /// Model description. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string modelName, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, string tags = null, string properties = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, modelName, skip, orderBy, top, version, description, tags, properties, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, modelName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, modelName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, modelName, version); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MachineLearningModelVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningModelVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, modelName, version); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MachineLearningModelVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningModelVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, MachineLearningModelVersionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, modelName, version, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. + /// Version identifier. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, registryName, modelName, version, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePackageRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, ModelPackageContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/package", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Model Version Package operation. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Package operation request body. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task PackageAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePackageRequest(subscriptionId, resourceGroupName, registryName, modelName, version, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Model Version Package operation. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Package operation request body. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Package(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, ModelPackageContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePackageRequest(subscriptionId, resourceGroupName, registryName, modelName, version, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrGetStartPendingUploadRequest(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, PendingUploadRequestDto body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(modelName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/startPendingUpload", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generate a storage location and credential for the client to upload a model asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Model name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrGetStartPendingUploadAsync(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, registryName, modelName, version, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generate a storage location and credential for the client to upload a model asset to. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Model name. This is case-sensitive. + /// Version identifier. This is case-sensitive. + /// Pending upload request object. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrGetStartPendingUpload(string subscriptionId, string resourceGroupName, string registryName, string modelName, string version, PendingUploadRequestDto body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateCreateOrGetStartPendingUploadRequest(subscriptionId, resourceGroupName, registryName, modelName, version, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PendingUploadResponseDto value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PendingUploadResponseDto.DeserializePendingUploadResponseDto(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string modelName, string skip, string orderBy, int? top, string version, string description, string tags, string properties, MachineLearningListViewType? listViewType) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Continuation token for pagination. + /// Ordering of list. + /// Maximum number of records to return. + /// Version identifier. + /// Model description. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string modelName, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, string tags = null, string properties = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, modelName, skip, orderBy, top, version, description, tags, properties, listViewType); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List versions. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Container name. This is case-sensitive. + /// Continuation token for pagination. + /// Ordering of list. + /// Maximum number of records to return. + /// Version identifier. + /// Model description. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string registryName, string modelName, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, string tags = null, string properties = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(modelName, nameof(modelName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, registryName, modelName, skip, orderBy, top, version, description, tags, properties, listViewType); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs index 87a7f92ac68e2..eaf4e35b1b132 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs @@ -33,7 +33,7 @@ public SchedulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/UsagesRestOperations.cs index c557fbf548061..8a6933333d85b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/UsagesRestOperations.cs @@ -33,7 +33,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs index f9280ac622416..944e0169bc87f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs @@ -33,7 +33,7 @@ public VirtualMachineSizesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs index 277e1192912f8..b867f83c85dee 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs @@ -33,15 +33,15 @@ public WorkspaceConnectionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string target, string category) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -50,44 +50,46 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); + uri.AppendPath("/connections", false); + if (target != null) + { + uri.AppendQuery("target", target, true); + } + if (category != null) + { + uri.AppendQuery("category", category, true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; _userAgent.Apply(message); return message; } + /// Lists all the available machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Friendly name of the workspace connection. - /// The object for creating or updating a new workspace connection. + /// Target of the workspace connection. + /// Category of the workspace connection. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceConnectionData value = default; + WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -95,31 +97,30 @@ public async Task> CreateAsync( } } + /// Lists all the available machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Friendly name of the workspace connection. - /// The object for creating or updating a new workspace connection. + /// Target of the workspace connection. + /// Category of the workspace connection. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceConnectionData value = default; + WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -127,6 +128,82 @@ public Response Create(string subscripti } } + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/connections/", false); + uri.AppendPath(connectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete machine learning workspaces connections by name. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete machine learning workspaces connections by name. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) { var message = _pipeline.CreateMessage(); @@ -149,6 +226,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } + /// Lists machine learning workspaces connections by name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. @@ -181,6 +259,7 @@ public async Task> GetAsync(str } } + /// Lists machine learning workspaces connections by name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. @@ -213,11 +292,11 @@ public Response Get(string subscriptionI } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -231,67 +310,85 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; _userAgent.Apply(message); return message; } + /// Update machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. + /// Parameters for workspace connection update. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningWorkspaceConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } + /// Update machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. + /// Parameters for workspace connection update. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningWorkspaceConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string target, string category) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -300,15 +397,101 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections", false); - if (target != null) + uri.AppendPath("/connections/", false); + uri.AppendPath(connectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update machine learning workspaces connections under the specified workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) { - uri.AppendQuery("target", target, true); + case 200: + { + MachineLearningWorkspaceConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); } - if (category != null) + } + + /// Create or update machine learning workspaces connections under the specified workspace. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) { - uri.AppendQuery("category", category, true); + case 200: + { + MachineLearningWorkspaceConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); } + } + + internal HttpMessage CreateListSecretsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/connections/", false); + uri.AppendPath(connectionName, true); + uri.AppendPath("/listsecrets", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -316,29 +499,30 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } + /// List all the secrets of a machine learning workspaces connections. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Target of the workspace connection. - /// Category of the workspace connection. + /// Friendly name of the workspace connection. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSecretsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category); + using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; + MachineLearningWorkspaceConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -346,29 +530,30 @@ public async Task List all the secrets of a machine learning workspaces connections. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// Target of the workspace connection. - /// Category of the workspace connection. + /// Friendly name of the workspace connection. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSecrets(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category); + using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; + MachineLearningWorkspaceConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -390,6 +575,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } + /// Lists all the available machine learning workspaces connections under the specified workspace. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -422,6 +608,7 @@ public async Task Lists all the available machine learning workspaces connections under the specified workspace. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs index 9a2b882022933..4cdec98dd6214 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs @@ -33,7 +33,7 @@ public WorkspaceFeaturesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs index 24d772523a6ca..d62e672e023d3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs @@ -33,11 +33,90 @@ public WorkspacesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-10-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string skip, string kind) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (kind != null) + { + uri.AppendQuery("kind", kind, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// The ID of the target subscription. + /// Continuation token for pagination. + /// Kind of workspace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string skip = null, string kind = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, skip, kind); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// The ID of the target subscription. + /// Continuation token for pagination. + /// Kind of workspace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string skip = null, string kind = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, skip, kind); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string skip, string kind) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -48,82 +127,85 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + if (kind != null) + { + uri.AppendQuery("kind", kind, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Gets the properties of the specified machine learning workspace. + /// Lists all the available machine learning workspaces under the specified resource group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string skip = null, string kind = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip, kind); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceData value = default; + WorkspaceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets the properties of the specified machine learning workspace. + /// Lists all the available machine learning workspaces under the specified resource group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string skip = null, string kind = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip, kind); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceData value = default; + WorkspaceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, bool? forceToPurge) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -133,75 +215,75 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); + if (forceToPurge != null) + { + uri.AppendQuery("forceToPurge", forceToPurge.Value, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates or updates a workspace with the specified parameters. + /// Deletes a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The parameters for creating or updating a machine learning workspace. + /// Flag to indicate delete is a purge request. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, bool? forceToPurge = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, forceToPurge); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Creates or updates a workspace with the specified parameters. + /// Deletes a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. - /// The parameters for creating or updating a machine learning workspace. + /// Flag to indicate delete is a purge request. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, bool? forceToPurge = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, forceToPurge); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -217,53 +299,63 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes a machine learning workspace. + /// Gets the properties of the specified machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MachineLearningWorkspaceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Deletes a machine learning workspace. + /// Gets the properties of the specified machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + MachineLearningWorkspaceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -347,80 +439,79 @@ public Response Update(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string skip) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; _userAgent.Apply(message); return message; } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Creates or updates a workspace with the specified parameters. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Continuation token for pagination. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkspaceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Creates or updates a workspace with the specified parameters. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Continuation token for pagination. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkspaceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -585,7 +676,7 @@ public Response ListKeys(string subscript } } - internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListNotebookAccessTokenRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -598,7 +689,7 @@ internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/resyncKeys", false); + uri.AppendPath("/listNotebookAccessToken", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -606,122 +697,57 @@ internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resou return message; } - /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ResyncKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListNotebookAccessTokenAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListNotebookAccessTokenRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MachineLearningWorkspaceNotebookAccessTokenResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningWorkspaceNotebookAccessTokenResult.DeserializeMachineLearningWorkspaceNotebookAccessTokenResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ResyncKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListNotebookAccessToken(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string skip) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the available machine learning workspaces under the specified subscription. - /// The ID of the target subscription. - /// Continuation token for pagination. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, string skip = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId, skip); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - WorkspaceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the available machine learning workspaces under the specified subscription. - /// The ID of the target subscription. - /// Continuation token for pagination. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, string skip = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId, skip); + using var message = CreateListNotebookAccessTokenRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkspaceListResult value = default; + MachineLearningWorkspaceNotebookAccessTokenResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + value = MachineLearningWorkspaceNotebookAccessTokenResult.DeserializeMachineLearningWorkspaceNotebookAccessTokenResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -729,7 +755,7 @@ public Response ListBySubscription(string subscriptionId, s } } - internal HttpMessage CreateListNotebookAccessTokenRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -742,7 +768,7 @@ internal HttpMessage CreateListNotebookAccessTokenRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/listNotebookAccessToken", false); + uri.AppendPath("/listNotebookKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -750,28 +776,28 @@ internal HttpMessage CreateListNotebookAccessTokenRequest(string subscriptionId, return message; } - /// return notebook access token and refresh token. + /// Lists keys of Azure Machine Learning Workspaces notebook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNotebookAccessTokenAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListNotebookKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNotebookAccessTokenRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceNotebookAccessTokenResult value = default; + MachineLearningWorkspaceGetNotebookKeysResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceNotebookAccessTokenResult.DeserializeMachineLearningWorkspaceNotebookAccessTokenResult(document.RootElement); + value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -779,28 +805,28 @@ public async Task> L } } - /// return notebook access token and refresh token. + /// Lists keys of Azure Machine Learning Workspaces notebook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNotebookAccessToken(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListNotebookKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNotebookAccessTokenRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceNotebookAccessTokenResult value = default; + MachineLearningWorkspaceGetNotebookKeysResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceNotebookAccessTokenResult.DeserializeMachineLearningWorkspaceNotebookAccessTokenResult(document.RootElement); + value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -808,7 +834,7 @@ public Response ListNotebookA } } - internal HttpMessage CreatePrepareNotebookRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListStorageAccountKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -821,7 +847,7 @@ internal HttpMessage CreatePrepareNotebookRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/prepareNotebook", false); + uri.AppendPath("/listStorageAccountKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -829,61 +855,69 @@ internal HttpMessage CreatePrepareNotebookRequest(string subscriptionId, string return message; } - /// Prepare a notebook. + /// Lists keys of Azure Machine Learning Workspace's storage account. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task PrepareNotebookAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListStorageAccountKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListStorageAccountKeysRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MachineLearningWorkspaceGetStorageAccountKeysResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningWorkspaceGetStorageAccountKeysResult.DeserializeMachineLearningWorkspaceGetStorageAccountKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Prepare a notebook. + /// Lists keys of Azure Machine Learning Workspace's storage account. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response PrepareNotebook(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListStorageAccountKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListStorageAccountKeysRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MachineLearningWorkspaceGetStorageAccountKeysResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningWorkspaceGetStorageAccountKeysResult.DeserializeMachineLearningWorkspaceGetStorageAccountKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateListStorageAccountKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -892,7 +926,7 @@ internal HttpMessage CreateListStorageAccountKeysRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/listStorageAccountKeys", false); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -900,28 +934,28 @@ internal HttpMessage CreateListStorageAccountKeysRequest(string subscriptionId, return message; } - /// List storage account keys of a workspace. + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStorageAccountKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListStorageAccountKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceGetStorageAccountKeysResult value = default; + ExternalFqdnResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceGetStorageAccountKeysResult.DeserializeMachineLearningWorkspaceGetStorageAccountKeysResult(document.RootElement); + value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -929,28 +963,28 @@ public async Task> } } - /// List storage account keys of a workspace. + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStorageAccountKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListStorageAccountKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceGetStorageAccountKeysResult value = default; + ExternalFqdnResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceGetStorageAccountKeysResult.DeserializeMachineLearningWorkspaceGetStorageAccountKeysResult(document.RootElement); + value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -958,7 +992,7 @@ public Response ListStorage } } - internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreatePrepareNotebookRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -971,7 +1005,7 @@ internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/listNotebookKeys", false); + uri.AppendPath("/prepareNotebook", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -979,69 +1013,61 @@ internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string return message; } - /// List keys of a notebook. + /// Prepare Azure Machine Learning Workspace's notebook resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNotebookKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task PrepareNotebookAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MachineLearningWorkspaceGetNotebookKeysResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List keys of a notebook. + /// Prepare Azure Machine Learning Workspace's notebook resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNotebookKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response PrepareNotebook(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MachineLearningWorkspaceGetNotebookKeysResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1050,7 +1076,7 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendPath("/resyncKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1058,65 +1084,57 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin return message; } - /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task ResyncKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ExternalFqdnResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// 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. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ResyncKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ExternalFqdnResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string skip) + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string skip, string kind) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1130,21 +1148,20 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Lists all the available machine learning workspaces under the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string skip = null, string kind = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skip, kind); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1160,21 +1177,20 @@ public async Task> ListByResourceGroupNextPageAsyn } } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Lists all the available machine learning workspaces under the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string skip = null, string kind = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skip, kind); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1190,7 +1206,7 @@ public Response ListByResourceGroupNextPage(string nextLink } } - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string skip) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string skip, string kind) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1204,19 +1220,22 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// Lists all the available machine learning workspaces under the specified subscription. + /// Lists all the available machine learning workspaces under the specified resource group. /// The URL to the next page of results. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string skip = null, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string skip = null, string kind = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skip); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip, kind); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1232,19 +1251,22 @@ public async Task> ListBySubscriptionNextPageAsync } } - /// Lists all the available machine learning workspaces under the specified subscription. + /// Lists all the available machine learning workspaces under the specified resource group. /// The URL to the next page of results. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// Continuation token for pagination. + /// Kind of workspace. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string skip = null, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string skip = null, string kind = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skip); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip, kind); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md index 524ba33350b33..aced6a85951bf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md @@ -7,8 +7,8 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: MachineLearning namespace: Azure.ResourceManager.MachineLearning -require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/b32e1896f30e6ea155449cb49719a6286e32b961/specification/machinelearningservices/resource-manager/readme.md -tag: package-2022-10 +require: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/machinelearningservices/resource-manager/readme.md +#tag: package-preview-2023-06 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -21,6 +21,9 @@ modelerfour: flatten-payloads: false deserialize-null-collection-as-null-value: true +#mgmt-debug: +# show-serialized-names: true + format-by-name-rules: 'tenantId': 'uuid' 'etag': 'etag' @@ -70,7 +73,49 @@ no-property-type-replacement: - ResourceId - VirtualMachineImage +request-path-to-resource-name: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}: MachineLearningCodeContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}: MachineLearningCodeVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}: MachineLearningComponentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}: MachineLearningComponentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}: MachineLearningDataContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}: MachineLearningDataVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}: MachineLearningEnvironmentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}: MachineLearningEnvironmentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}: MachineLearningModelContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}: MachineLearningModelVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}: MachineLearningRegistryCodeContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}: MachineLearningRegistryCodeVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}: MachineLearninRegistryComponentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}: MachineLearninRegistryComponentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}: MachineLearningRegistryDataContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}: MachineLearningRegistryDataVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}: MachineLearningRegistryEnvironmentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}: MachineLearningRegistryEnvironmentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}: MachineLearningRegistryModelContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}: MachineLearningRegistryModelVersion + +prepend-rp-prefix: + - Feature + - FeatureProperties + - LabelingJob + - Registry + - Webhook + - WebhookType + - AllFeatures + rename-mapping: + FeaturesetContainer: MachineLearningFeatureSetContainer + FeaturesetContainerProperties: MachineLearningFeatureSetContainerProperties + FeaturesetJob: MachineLearningFeatureSetJob + FeaturesetVersion: MachineLearningFeatureSetVersion + FeaturesetVersionBackfillRequest: FeatureSetVersionBackfillContent + FeaturesetVersionProperties: MachineLearningFeatureSetVersionProperties + FeaturestoreEntityContainer: MachineLearningFeatureStoreEntityContainer + FeaturestoreEntityContainerProperties: MachineLearningFeatureStoreEntityContainerProperties + FeaturestoreEntityVersion: MachineLearningFeaturestoreEntityVersion + FeaturestoreEntityVersionProperties: MachineLearningFeatureStoreEntityVersionProperties + FeaturestoreJobType: FeatureStoreJobType ComputeInstanceProperties.setupScripts: SetupScriptsSettings Workspace: MachineLearningWorkspace ComputeResource: MachineLearningCompute @@ -95,6 +140,7 @@ rename-mapping: SynapseSparkProperties: MachineLearningSynapseSparkProperties ProvisioningState: MachineLearningProvisioningState ListWorkspaceKeysResult: MachineLearningWorkspaceGetKeysResult + ListWorkspaceKeysResult.userStorageArmId: UserStorageResourceId RegistryListCredentialsResult: MachineLearningContainerRegistryCredentials Password: MachineLearningPasswordDetail BatchDeploymentTrackedResource: MachineLearningBatchDeployment @@ -144,12 +190,11 @@ rename-mapping: QuotaUpdateParameters: MachineLearningQuotaUpdateContent EncryptionProperty: MachineLearningEncryptionSetting EncryptionStatus: MachineLearningEncryptionStatus - EncryptionKeyVaultProperties: MachineLearningEncryptionKeyVaultProperties - EncryptionKeyVaultProperties.keyVaultArmId: -|arm-id + KeyVaultProperties: MachineLearningEncryptionKeyVaultProperties + KeyVaultProperties.keyVaultArmId: -|arm-id IdentityForCmk: MachineLearningCmkIdentity IdentityForCmk.userAssignedIdentity: -|arm-id NotebookResourceInfo: MachineLearningNotebookResourceInfo - PublicNetworkAccess: MachineLearningPublicNetworkAccess SharedPrivateLinkResource: MachineLearningSharedPrivateLinkResource SharedPrivateLinkResource.properties.privateLinkResourceId: -|arm-id Workspace.properties.storageHnsEnabled: IsStorageHnsEnabled @@ -159,8 +204,8 @@ rename-mapping: DiagnoseRequestProperties: MachineLearningWorkspaceDiagnoseProperties NotebookAccessTokenResult: MachineLearningWorkspaceNotebookAccessTokenResult ListNotebookKeysResult: MachineLearningWorkspaceGetNotebookKeysResult - FqdnEndpoints: MachineLearningFqdnEndpoints - FqdnEndpointsProperties: MachineLearningFqdnEndpointsProperties + FqdnEndpointsPropertyBag: MachineLearningFqdnEndpoints + FqdnEndpoints: MachineLearningFqdnEndpointsProperties ListStorageAccountKeysResult: MachineLearningWorkspaceGetStorageAccountKeysResult AmlUserFeature: MachineLearningUserFeature DatastoreCredentials: MachineLearningDatastoreCredentials @@ -222,6 +267,8 @@ rename-mapping: ComputeInstanceState: MachineLearningComputeInstanceState ComputePowerAction: MachineLearningComputePowerAction ComputeStartStopSchedule: MachineLearningComputeStartStopSchedule + ComputeStartStopSchedule.recurrence: RecurrenceSchedule + ComputeStartStopSchedule.cron: CronSchedule ProvisioningStatus: MachineLearningComputeProvisioningStatus ScheduleBase: MachineLearningScheduleBase ScheduleStatus: MachineLearningScheduleStatus @@ -339,9 +386,9 @@ rename-mapping: OrderString: MachineLearningOrderString OsType: MachineLearningOSType PipelineJob: MachineLearningPipelineJob - PrivateEndpoint: MachineLearningPrivateEndpoint - PrivateEndpoint.id: -|arm-id - PrivateEndpoint.subnetArmId: -|arm-id + WorkspacePrivateEndpointResource: MachineLearningPrivateEndpoint + WorkspacePrivateEndpointResource.id: -|arm-id + WorkspacePrivateEndpointResource.subnetArmId: -|arm-id ProbeSettings: MachineLearningProbeSettings PublicNetworkAccessType: MachineLearningPublicNetworkAccessType QuotaBaseProperties: MachineLearningQuotaProperties @@ -392,7 +439,10 @@ rename-mapping: VmPriority: MachineLearningVmPriority WorkspaceConnectionUsernamePassword: MachineLearningWorkspaceConnectionUsernamePassword Workspace.properties.hbiWorkspace: IsHbiWorkspace + Workspace.properties.publicNetworkAccess: PublicNetworkAccessType + WorkspaceUpdateParameters.properties.publicNetworkAccess: PublicNetworkAccessType AllocationState: MachineLearningAllocationState + FeatureResource: MachineLearningFeatureResource ResourceId.id: -|arm-id JobBase.componentId: -|arm-id JobBase.computeId: -|arm-id @@ -413,6 +463,60 @@ rename-mapping: Forecasting: MachineLearningForecasting EndpointAuthToken.expiryTimeUtc: ExpireOn|unixtime # this temporarily does not work EndpointAuthToken.refreshAfterTimeUtc: RefreshOn|unixtime # this temporarily does not work + SystemCreatedAcrAccount.armResourceId: ArmResourceIdentifier|arm-id + SystemCreatedStorageAccount.armResourceId: ArmResourceIdentifier|arm-id + UserCreatedAcrAccount.armResourceId: ArmResourceIdentifier|arm-id + UserCreatedStorageAccount.armResourceId: ArmResourceIdentifier|arm-id + Cron: ComputeStartStopCronSchedule + Recurrence: ComputeStartStopRecurrenceSchedule + EndpointServiceConnectionStatus: MachineLearningPrivateEndpointServiceConnectionStatus + ArmResourceId.resourceId: -|arm-id + Workspace.properties.hubResourceId: -|arm-id + OutboundRuleBasicResource: MachineLearningOutboundRuleBasic + OutboundRule: MachineLearningOutboundRule + BindOptions: MountBindOptions + BindOptions.createHostPath: DoesCreateHostPath + AcrDetails: RegistryAcrDetails + AllNodes: JobAllNodes + Nodes: JobNodes + AssetProvisioningState: RegistryAssetProvisioningState + BaseEnvironmentId: BaseEnvironmentType + BaseEnvironmentId.resourceId: -|arm-id + BlobReferenceForConsumptionDto.storageAccountArmId: -|arm-id + Collection: DataCollectionConfiguration + Docker: DockerSetting + Endpoint: ContainerEndpoint + Protocol: ContainerCommunicationProtocol + Image: ImageSetting + ConnectionCategory.AzureSqlDb: AzureSqlDB + ConnectionCategory.AzureMySqlDb: AzureMySqlDB + ConnectionCategory.AzurePostgresDb: AzurePostgresDB + EncryptionProperty.cosmosDbResourceId: CosmosDBResourceId|arm-id + EncryptionProperty.searchAccountResourceId: -|arm-id + EncryptionProperty.storageAccountResourceId: -|arm-id + MLAssistConfiguration: MachineLearningAssistConfiguration + MLAssistConfigurationEnabled: MachineLearningAssistEnabledConfiguration + MlflowAutologger: MachineLearningFlowAutoLogger + MLFlowAutologgerState: MachineLearningFlowAutoLoggerState + MultiSelect: LabelCategoryMultiSelect + PackageRequest: ModelPackageContent + PackageResponse: ModelPackageResult + PackageInputPathId.resourceId: -|arm-id + PrivateEndpointResource: RegistryPrivateEndpoint + PrivateEndpointResource.subnetArmId: -|arm-id + PrivateEndpoint: PrivateEndpointBase + PrivateEndpoint.id: -|arm-id + QueueSettings: JobQueueSettings + Ray: RayDistributionConfiguration + RegistryPrivateEndpointConnection.id: -|arm-id + RuleAction: NetworkingRuleAction + RuleCategory: OutboundRuleCategory + RuleStatus: OutboundRuleStatus + RuleType: OutboundRuleType + StatusMessage: JobStatusMessage + StatusMessageLevel: JobStatusMessageLevel + ImageType.azureml: AzureML + ProtectionLevel: IntellectualProtectionLevel directive: - from: swagger-document @@ -473,6 +577,11 @@ directive: - from: swagger-document where: $.definitions.TableVerticalValidationDataSettings.properties.cvSplitColumnNames transform: $["x-nullable"] = true; + - from: workspaceRP.json + where: $.definitions + transform: > + $.PrivateLinkResourceProperties.properties.groupId.readOnly = true; + $.PrivateLinkResourceProperties.properties.requiredMembers.readOnly = true; # quite a few x-ms-client-name extensions are defined in the swagger, we here erase them all to prevent some funny interactions between our own renaming configuration - from: mfe.json where: $.definitions diff --git a/sdk/recoveryservices-datareplication/ci.mgmt.yml b/sdk/recoveryservices-datareplication/ci.mgmt.yml index d1d25ec16b024..2e3966d67a889 100644 --- a/sdk/recoveryservices-datareplication/ci.mgmt.yml +++ b/sdk/recoveryservices-datareplication/ci.mgmt.yml @@ -10,13 +10,13 @@ pr: - release/* paths: include: - - sdk/recoveryservicesdatareplication/ci.mgmt.yml - - sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + - sdk/recoveryservices-datareplication/ci.mgmt.yml + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: - ServiceDirectory: recoveryservicesdatareplication + ServiceDirectory: recoveryservices-datareplication LimitForPullRequest: true Artifacts: - name: Azure.ResourceManager.RecoveryServicesDataReplication